Class AssignSelfOptOutMembershipPrivilegeRevocationVetoHook
java.lang.Object
edu.internet2.middleware.grouper.hooks.MembershipHooks
edu.internet2.middleware.grouper.hooks.examples.AssignSelfOptOutMembershipPrivilegeRevocationVetoHook
If you want the group or groups in a folder to allow opt out to anyone in group, then configure this hook in grouper.properties: hooks.group.class=edu.internet2.middleware.grouper.hooks.examples.AssignSelfOptOutGroupPrivilegeHook hooks.membership.class=edu.internet2.middleware.grouper.hooks.examples.AssignSelfOptOutMembershipPrivilegeRevocationVetoHook configure an attribute to assign to groups or folders in grouper.properties grouper.optOutRequired.attributeDefName = a:b:c:assignOptOut https://bugs.internet2.edu/jira/browse/GRP-1197 grouperSession = GrouperSession.startRootSession(); String attributeFolderName = "a:b:c"; attributeDef = new AttributeDefSave(grouperSession).assignName(attributeFolderName + ":assignOptOutDef").assignToStem(true).assignAttributeDefType(AttributeDefType.attr).assignCreateParentStemsIfNotExist(true).assignValueType(AttributeDefValueType.marker).save(); attributeDef.getAttributeDefActionDelegate().configureActionList("assign"); attributeDefName = new AttributeDefNameSave(grouperSession, attributeDef).assignName(attributeFolderName + ":assignOptOut").assignCreateParentStemsIfNotExist(true).save(); Test it out stem = new StemSave(grouperSession).assignName("j:k").assignCreateParentStemsIfNotExist(true).save(); stem.getAttributeDelegate().assignAttribute(attributeDefName); groupSub = new GroupSave(grouperSession).assignName("j:k:l:m").assignCreateParentStemsIfNotExist(true).save();
-
Field Summary
Fields inherited from class edu.internet2.middleware.grouper.hooks.MembershipHooks
METHOD_MEMBERSHIP_POST_ADD_MEMBER, METHOD_MEMBERSHIP_POST_COMMIT_ADD_MEMBER, METHOD_MEMBERSHIP_POST_COMMIT_DELETE, METHOD_MEMBERSHIP_POST_COMMIT_INSERT, METHOD_MEMBERSHIP_POST_COMMIT_REMOVE_MEMBER, METHOD_MEMBERSHIP_POST_COMMIT_UPDATE, METHOD_MEMBERSHIP_POST_DELETE, METHOD_MEMBERSHIP_POST_INSERT, METHOD_MEMBERSHIP_POST_REMOVE_MEMBER, METHOD_MEMBERSHIP_POST_UPDATE, METHOD_MEMBERSHIP_PRE_ADD_MEMBER, METHOD_MEMBERSHIP_PRE_DELETE, METHOD_MEMBERSHIP_PRE_INSERT, METHOD_MEMBERSHIP_PRE_REMOVE_MEMBER, METHOD_MEMBERSHIP_PRE_UPDATE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
membershipPreRemoveMember
(HooksContext hooksContext, HooksMembershipChangeBean preDeleteMemberBean) called right before a membership delete (high level, not the side effects)Methods inherited from class edu.internet2.middleware.grouper.hooks.MembershipHooks
membershipPostAddMember, membershipPostCommitAddMember, membershipPostCommitDelete, membershipPostCommitInsert, membershipPostCommitRemoveMember, membershipPostCommitUpdate, membershipPostDelete, membershipPostInsert, membershipPostRemoveMember, membershipPostUpdate, membershipPreAddMember, membershipPreDelete, membershipPreInsert, membershipPreUpdate
-
Field Details
-
GROUPER_OPT_OUT_REQUIRED_ATTRIBUTE_DEF_NAME
- See Also:
-
-
Constructor Details
-
AssignSelfOptOutMembershipPrivilegeRevocationVetoHook
public AssignSelfOptOutMembershipPrivilegeRevocationVetoHook()
-
-
Method Details
-
membershipPreRemoveMember
public void membershipPreRemoveMember(HooksContext hooksContext, HooksMembershipChangeBean preDeleteMemberBean) Description copied from class:MembershipHooks
called right before a membership delete (high level, not the side effects)
-