grouper-users - Re: [grouper-users] Load a group member from a data source, and then forget it in N days
Subject: Grouper Users - Open Discussion List
List archive
Re: [grouper-users] Load a group member from a data source, and then forget it in N days
Chronological Thread
- From: Jeffrey Eaton <>
- To: "Waldbieser, Carl" <>
- Cc: "Hyzer, Chris" <>, Gouper Users List <>
- Subject: Re: [grouper-users] Load a group member from a data source, and then forget it in N days
- Date: Thu, 4 Aug 2016 14:10:42 +0000
- Accept-language: en-US
We do something similar (in reverse - when you are removed from one group, you are added to another group for N days). I believe this was how I created the rules:
// Rule 3: on the "recent" group... recentGroup = GroupFinder.findByName(grouperSession, "Apps:Provisioning:auto:Active-Faculty-Recent"); AttributeAssign attributeAssignRecent2 = recentGroup.getAttributeDelegate().addAttribute(RuleUtils.ruleAttributeDefName()).getAttributeAssign(); attributeAssignRecent2.getAttributeValueDelegate().assignValue(RuleUtils.ruleActAsSubjectSourceIdName(), "g:isa"); attributeAssignRecent2.getAttributeValueDelegate().assignValue(RuleUtils.ruleRunDaemonName(), "F"); attributeAssignRecent2.getAttributeValueDelegate().assignValue(RuleUtils.ruleActAsSubjectIdName(), "GrouperSystem"); // Rule 3: Fires when a member is removed from the corresponding loader-managed group attributeAssignRecent2.getAttributeValueDelegate().assignValue(RuleUtils.ruleCheckOwnerNameName(), "Apps:Provisioning:auto:Active-Faculty"); attributeAssignRecent2.getAttributeValueDelegate().assignValue(RuleUtils.ruleCheckTypeName(),RuleCheckType.membershipRemove.name()); // Then add member to the "recent" group attributeAssignRecent2.getAttributeValueDelegate().assignValue(RuleUtils.ruleThenEnumName(), RuleThenEnum.addMemberToOwnerGroup.name()); // Rule 3a: set expiration on the membership of the recent group AttributeAssign attributeAssignRecentExpiration = recentGroup.getAttributeDelegate().addAttribute(RuleUtils.ruleAttributeDefName()).getAttributeAssign(); // Act as GrouperSystem attributeAssignRecentExpiration.getAttributeValueDelegate().assignValue(RuleUtils.ruleActAsSubjectSourceIdName(), "g:isa"); attributeAssignRecentExpiration.getAttributeValueDelegate().assignValue(RuleUtils.ruleRunDaemonName(), "F"); attributeAssignRecentExpiration.getAttributeValueDelegate().assignValue(RuleUtils.ruleActAsSubjectIdName(), "GrouperSystem"); // Fire the rule when a membership is added to the "recent" group attributeAssignRecentExpiration.getAttributeValueDelegate().assignValue(RuleUtils.ruleCheckOwnerNameName(), "Apps:Provisioning:auto:Active-Faculty-Recent"); attributeAssignRecentExpiration.getAttributeValueDelegate().assignValue(RuleUtils.ruleCheckTypeName(),RuleCheckType.membershipAdd.name()); // Then set an expiration of 30 days (change the number of days as needed) attributeAssignRecentExpiration.getAttributeValueDelegate().assignValue(RuleUtils.ruleThenEnumArg0Name(), "30"); attributeAssignRecentExpiration.getAttributeValueDelegate().assignValue(RuleUtils.ruleThenEnumArg1Name(), "T"); attributeAssignRecentExpiration.getAttributeValueDelegate().assignValue(RuleUtils.ruleThenEnumName(), RuleThenEnum.assignMembershipDisabledDaysForOwnerGroupId.name());
|
- [grouper-users] Load a group member from a data source, and then forget it in N days, Waldbieser, Carl, 08/02/2016
- [grouper-users] RE: Load a group member from a data source, and then forget it in N days, Hyzer, Chris, 08/03/2016
- [grouper-users] RE: Load a group member from a data source, and then forget it in N days, Waldbieser, Carl, 08/03/2016
- [grouper-users] RE: Load a group member from a data source, and then forget it in N days, Hyzer, Chris, 08/03/2016
- [grouper-users] Re: Load a group member from a data source, and then forget it in N days, Waldbieser, Carl, 08/04/2016
- Re: [grouper-users] Load a group member from a data source, and then forget it in N days, Jeffrey Eaton, 08/04/2016
- Re: [grouper-users] Load a group member from a data source, and then forget it in N days, Waldbieser, Carl, 08/04/2016
- RE: [grouper-users] Load a group member from a data source, and then forget it in N days, Hyzer, Chris, 08/04/2016
- Re: [grouper-users] Load a group member from a data source, and then forget it in N days, Jeffrey Eaton, 08/04/2016
- Re: [grouper-users] Load a group member from a data source, and then forget it in N days, Waldbieser, Carl, 08/04/2016
- Re: [grouper-users] Load a group member from a data source, and then forget it in N days, Jeffrey Eaton, 08/04/2016
- [grouper-users] Re: Load a group member from a data source, and then forget it in N days, Waldbieser, Carl, 08/04/2016
- [grouper-users] RE: Load a group member from a data source, and then forget it in N days, Hyzer, Chris, 08/03/2016
- [grouper-users] RE: Load a group member from a data source, and then forget it in N days, Waldbieser, Carl, 08/03/2016
- [grouper-users] RE: Load a group member from a data source, and then forget it in N days, Hyzer, Chris, 08/03/2016
Archive powered by MHonArc 2.6.19.