]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.client.ui.dist/src/org/argeo/slc/client/ui/dist/wizards/ChangeRightsWizard.java
1 package org
.argeo
.slc
.client
.ui
.dist
.wizards
;
3 import javax
.jcr
.RepositoryException
;
4 import javax
.jcr
.Session
;
6 import org
.argeo
.jcr
.JcrUtils
;
7 import org
.argeo
.slc
.SlcException
;
8 import org
.eclipse
.jface
.wizard
.Wizard
;
11 * Small wizard to manage authorizations on the root node of the current
14 public class ChangeRightsWizard
extends Wizard
{
16 private Session currentSession
;
19 private ChooseRightsPage page
;
21 public ChangeRightsWizard(Session currentSession
) {
23 this.currentSession
= currentSession
;
27 public void addPages() {
29 page
= new ChooseRightsPage();
31 } catch (Exception e
) {
32 throw new SlcException("Cannot add page to wizard ", e
);
37 public boolean performFinish() {
41 JcrUtils
.addPrivilege(currentSession
, "/", page
.getGroupName(),
42 page
.getAuthTypeStr());
43 } catch (RepositoryException re
) {
44 throw new SlcException(
45 "Unexpected error while setting privileges", re
);