Class GroupTypeSecurityHook
java.lang.Object
edu.internet2.middleware.grouper.hooks.GroupTypeTupleHooks
edu.internet2.middleware.grouper.hooks.examples.GroupTypeSecurityHook
built in hook to grouper, which is turned on when it is configured in the grouper.properties. you can security certain group types which can only be added/removed to/from a group based on if the user doing the work is in a certain group (or wheel), or if the user is only a wheel group member. normally a user with admin rights on a group can edit the group type associations Log debug with log4j setting log4j.logger.edu.internet2.middleware.grouper.hooks.examples.GroupTypeSecurityHook = DEBUG
-
Field Summary
Fields inherited from class edu.internet2.middleware.grouper.hooks.GroupTypeTupleHooks
METHOD_GROUP_TYPE_TUPLE_POST_COMMIT_DELETE, METHOD_GROUP_TYPE_TUPLE_POST_COMMIT_INSERT, METHOD_GROUP_TYPE_TUPLE_POST_COMMIT_UPDATE, METHOD_GROUP_TYPE_TUPLE_POST_DELETE, METHOD_GROUP_TYPE_TUPLE_POST_INSERT, METHOD_GROUP_TYPE_TUPLE_POST_UPDATE, METHOD_GROUP_TYPE_TUPLE_PRE_DELETE, METHOD_GROUP_TYPE_TUPLE_PRE_INSERT, METHOD_GROUP_TYPE_TUPLE_PRE_UPDATE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static String
groupNameFromAndGroupAttributeName
(String attributeName) void
groupTypeTuplePostDelete
(HooksContext hooksContext, HooksGroupTypeTupleBean postDeleteBean) called right after a groupTypeTuple deletevoid
groupTypeTuplePostInsert
(HooksContext hooksContext, HooksGroupTypeTupleBean postInsertBean) called right after a groupTypeTuple insertstatic boolean
If the hook was registered due to settings in the grouper.propertiesstatic void
registerHookIfNecessary
(boolean tryAgainIfNotBefore) see if this is configured in the grouper.properties, if so, register this hookstatic boolean
reset cached settings from config, return true if found somestatic void
vetoIfNecessary
(String groupUuid, String typeUuid, String descriptionForLog) veto a type or attribute edit if necessaryMethods inherited from class edu.internet2.middleware.grouper.hooks.GroupTypeTupleHooks
groupTypeTuplePostCommitDelete, groupTypeTuplePostCommitInsert, groupTypeTuplePostCommitUpdate, groupTypeTuplePostUpdate, groupTypeTuplePreDelete, groupTypeTuplePreInsert, groupTypeTuplePreUpdate
-
Constructor Details
-
GroupTypeSecurityHook
public GroupTypeSecurityHook()
-
-
Method Details
-
clearHook
public static void clearHook() -
registerHookIfNecessary
public static void registerHookIfNecessary(boolean tryAgainIfNotBefore) see if this is configured in the grouper.properties, if so, register this hook- Parameters:
tryAgainIfNotBefore
-
-
resetCacheSettings
public static boolean resetCacheSettings()reset cached settings from config, return true if found some- Returns:
- true if found some
-
vetoIfNecessary
public static void vetoIfNecessary(String groupUuid, String typeUuid, String descriptionForLog) throws HookVeto veto a type or attribute edit if necessary- Parameters:
groupUuid
-typeUuid
-descriptionForLog
-- Throws:
HookVeto
- if there is a problem
-
groupNameFromAndGroupAttributeName
- Parameters:
attributeName
-- Returns:
- the group name from the config file
-
groupTypeTuplePostDelete
public void groupTypeTuplePostDelete(HooksContext hooksContext, HooksGroupTypeTupleBean postDeleteBean) Description copied from class:GroupTypeTupleHooks
called right after a groupTypeTuple delete -
groupTypeTuplePostInsert
public void groupTypeTuplePostInsert(HooksContext hooksContext, HooksGroupTypeTupleBean postInsertBean) Description copied from class:GroupTypeTupleHooks
called right after a groupTypeTuple insert -
isRegisteredSuccess
public static boolean isRegisteredSuccess()If the hook was registered due to settings in the grouper.properties- Returns:
- true/false
-