Class AssignReadonlyAdminPrivilegeGroupHook
java.lang.Object
edu.internet2.middleware.grouper.hooks.GroupHooks
edu.internet2.middleware.grouper.hooks.examples.AssignReadonlyAdminPrivilegeGroupHook
AssignReadOnlyAdminPrivilege adds the read privileges for the newly created groups to self (this group's subject)
assign READ to an admins group based on attribute assignment to a parent folder configure in grouper.properties: hooks.group.class=edu.internet2.middleware.grouper.hooks.examples.AssignReadonlyAdminPrivilegeGroupHook hooks.membership.class=edu.internet2.middleware.grouper.hooks.examples.AssignReadonlyAdminPrivilegeVetoMembershipHook grouper.readonlyAdminEnforced.attributeDefName = a:b:c:reaodnlyAdmin grouper.readonlyAdminEnforced.groupName = c:d:readonlyAdmins setup objects in GSH: grouperSession = GrouperSession.startRootSession(); String attributeFolderName = "a:b:c"; attributeDef = new AttributeDefSave(grouperSession).assignName(attributeFolderName + ":readonlyAdminDef").assignToStem(true).assignAttributeDefType(AttributeDefType.attr).assignCreateParentStemsIfNotExist(true).assignValueType(AttributeDefValueType.marker).save(); attributeDef.getAttributeDefActionDelegate().configureActionList("assign"); attributeDefName = new AttributeDefNameSave(grouperSession, attributeDef).assignName(attributeFolderName + ":readonlyAdmin").assignCreateParentStemsIfNotExist(true).save(); groupAdmin = new GroupSave(grouperSession).assignName("c:d:readonlyAdmins").assignCreateParentStemsIfNotExist(true).save(); make a group to test: stem = new StemSave(grouperSession).assignName("l:m").assignCreateParentStemsIfNotExist(true).save(); stem.getAttributeDelegate().assignAttribute(attributeDefName); groupSub = new GroupSave(grouperSession).assignName("l:m:n:o").assignCreateParentStemsIfNotExist(true).save(); groupNotSub = new GroupSave(grouperSession).assignName("l:p").assignCreateParentStemsIfNotExist(true).save();
-
Field Summary
Fields inherited from class edu.internet2.middleware.grouper.hooks.GroupHooks
METHOD_GROUP_POST_COMMIT_DELETE, METHOD_GROUP_POST_COMMIT_INSERT, METHOD_GROUP_POST_COMMIT_UPDATE, METHOD_GROUP_POST_DELETE, METHOD_GROUP_POST_INSERT, METHOD_GROUP_POST_UPDATE, METHOD_GROUP_PRE_DELETE, METHOD_GROUP_PRE_INSERT, METHOD_GROUP_PRE_UPDATE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
groupPostCommitInsert
(HooksContext hooksContext, HooksGroupBean postCommitInsertBean) called right after the commit of a post insert commit.Methods inherited from class edu.internet2.middleware.grouper.hooks.GroupHooks
groupPostCommitDelete, groupPostCommitUpdate, groupPostDelete, groupPostInsert, groupPostUpdate, groupPreDelete, groupPreInsert, groupPreUpdate
-
Constructor Details
-
AssignReadonlyAdminPrivilegeGroupHook
public AssignReadonlyAdminPrivilegeGroupHook()
-
-
Method Details
-
groupPostCommitInsert
Description copied from class:GroupHooks
called right after the commit of a post insert commit. Note, cant veto this or participate in the tx
-