See: Description
| Class | Description |
|---|---|
| AssignReadonlyAdminPrivilegeGroupHook |
AssignReadOnlyAdminPrivilege adds the read privileges for the newly created groups to self (this group's subject)
|
| AssignReadonlyAdminPrivilegeVetoMembershipHook |
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();
|
| AssignSelfOptOutGroupPrivilegeHook |
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();
|
| 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();
|
| AttributeAutoCreateHook |
this will only run after grouper is started up
|
| AttributeDefAttributeNameValidationHook |
built in hook to grouper, which is turned on when it is configured in the grouper.properties.
|
| AttributeDefNameAttributeNameValidationHook |
built in hook to grouper, which is turned on when it is configured in the grouper.properties.
|
| AttributeDefNameUniqueNameCaseInsensitiveHook |
built in hook to grouper, which is turned on when it is configured in the grouper.properties.
|
| AttributeDefUniqueNameCaseInsensitiveHook |
built in hook to grouper, which is turned on when it is configured in the grouper.properties.
|
| AttributeHooksImplExampleEmail |
test implementation of group hooks for test.
|
| AttributeIncludeExcludeHook |
built in hook to grouper, which is turned on when it is configured in the grouper.properties.
|
| AttributeSecurityFromTypeHook |
built in hook to grouper, which is turned on when it is configured in the grouper.properties.
|
| GroupAttributeNameValidationAttrHook |
built in hook to grouper, which is turned on when it is configured in the grouper.properties.
|
| GroupAttributeNameValidationHook |
built in hook to grouper, which is turned on when it is configured in the grouper.properties.
|
| GrouperAttributeAssignValueRulesConfigHook |
Fire on attribute assign value changes, validate the rules and
set the answer in "valid" T|F attribute value
|
| GroupHooksImplExample |
test implementation of group hooks for test
|
| GroupTypeSecurityHook |
built in hook to grouper, which is turned on when it is configured in the grouper.properties.
|
| GroupTypeTupleIncludeExcludeHook |
built in hook to grouper, which is turned on when it is configured in the grouper.properties.
|
| GroupUniqueExtensionHook |
built in hook to grouper, which is turned on when it is configured in the grouper.properties.
|
| GroupUniqueNameCaseInsensitiveHook |
built in hook to grouper, which is turned on when it is configured in the grouper.properties.
|
| HierarchicalOrgLoaderHook | |
| LDAPProvisioningHook |
hook to prevent ldap provisioning by setting an attribute on the group.
|
| MembershipCannotAddSelfToGroupHook |
Hook allows only one membership in a folder at a time
|
| MembershipHooksImplExample |
test implementation of group hooks for test
|
| MembershipHooksImplScreenMessageExample |
group hook to put message on screen
|
| MembershipOneInFolderMaxHook |
Hook allows only one membership in a folder at a time
|
| StemAttributeNameValidationHook |
built in hook to grouper, which is turned on when it is configured in the grouper.properties.
|
| StemUniqueNameCaseInsensitiveHook |
built in hook to grouper, which is turned on when it is configured in the grouper.properties.
|
| UniqueObjectAttributeDefHook |
When attribute defs are created or saved, make sure there are no name conflicts with other object types
|
| UniqueObjectAttributeDefNameHook |
When attribute def names are created or saved, make sure there are no name conflicts with other object types
|
| UniqueObjectGroupHook |
When groups are created or saved, make sure there are no name conflicts with other object types
|
| UniqueObjectStemHook |
When folders are created or saved, make sure there are no name conflicts with other object types
|
This package contains working hooks examples which can be cloned and tweaked
Copyright © 2016 Internet2. All rights reserved.