|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.security.user.action.AbstractAuthorizableAction
org.apache.jackrabbit.core.security.user.action.AccessControlAction
public class AccessControlAction
The AccessControlAction allows to setup permissions upon creation
of a new authorizable; namely the privileges the new authorizable should be
granted on it's own 'home directory' being represented by the new node
associated with that new authorizable.
The following to configuration parameters are available with this implementation:
Example configuration:
<UserManager class="org.apache.jackrabbit.core.security.user.UserPerWorkspaceUserManager">
<AuthorizableAction class="org.apache.jackrabbit.core.security.user.action.AccessControlAction">
<param name="groupPrivilegeNames" value="jcr:read"/>
<param name="userPrivilegeNames" value="jcr:read, rep:write"/>
</AuthorizableAction>
</UserManager>
The example configuration will lead to the following content structure upon user or group creation::
UserManager umgr = ((JackrabbitSession) session).getUserManager();
User user = umgr.createUser("testUser", "t");
+ t rep:AuthorizableFolder
+ te rep:AuthorizableFolder
+ testUser rep:User, mix:AccessControllable
+ rep:policy rep:ACL
+ allow rep:GrantACE
- rep:principalName = "testUser"
- rep:privileges = ["jcr:read","rep:write"]
- rep:password
- rep:principalName = "testUser"
UserManager umgr = ((JackrabbitSession) session).getUserManager();
Group group = umgr.createGroup("testGroup");
+ t rep:AuthorizableFolder
+ te rep:AuthorizableFolder
+ testGroup rep:Group, mix:AccessControllable
+ rep:policy rep:ACL
+ allow rep:GrantACE
- rep:principalName = "testGroup"
- rep:privileges = ["jcr:read"]
- rep:principalName = "testGroup"
| Constructor Summary | |
|---|---|
AccessControlAction()
Create a new instance. |
|
| Method Summary | |
|---|---|
void |
onCreate(org.apache.jackrabbit.api.security.user.Group group,
Session session)
Doesn't perform any action. |
void |
onCreate(org.apache.jackrabbit.api.security.user.User user,
String password,
Session session)
Doesn't perform any action. |
void |
setGroupPrivilegeNames(String privilegeNames)
Sets the privileges a new group will be granted on the group's home directory. |
void |
setUserPrivilegeNames(String privilegeNames)
Sets the privileges a new user will be granted on the user's home directory. |
| Methods inherited from class org.apache.jackrabbit.core.security.user.action.AbstractAuthorizableAction |
|---|
onPasswordChange, onRemove |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AccessControlAction()
| Method Detail |
|---|
public void onCreate(org.apache.jackrabbit.api.security.user.Group group,
Session session)
throws RepositoryException
AbstractAuthorizableAction
onCreate in interface AuthorizableActiononCreate in class AbstractAuthorizableActiongroup - The new group that has not yet been persisted;
e.g. the associated node is still 'NEW'.session - The editing session associated with the user manager.
RepositoryException - If an error occurs.AuthorizableAction.onCreate(org.apache.jackrabbit.api.security.user.Group, javax.jcr.Session)
public void onCreate(org.apache.jackrabbit.api.security.user.User user,
String password,
Session session)
throws RepositoryException
AbstractAuthorizableAction
onCreate in interface AuthorizableActiononCreate in class AbstractAuthorizableActionuser - The new user that has not yet been persisted;
e.g. the associated node is still 'NEW'.password - The password that was specified upon user creation.session - The editing session associated with the user manager.
RepositoryException - If an error occurs.AuthorizableAction.onCreate(org.apache.jackrabbit.api.security.user.User, String, javax.jcr.Session)public void setGroupPrivilegeNames(String privilegeNames)
privilegeNames - A comma separated list of privilege names.public void setUserPrivilegeNames(String privilegeNames)
privilegeNames - A comma separated list of privilege names.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||