This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARS Workflow - Deny Adding user to group

Hi, would anyone be able to help out with this conundrum?

We have 2 x security groups that provide access to resources.

However, we want to prevent a user being a member of both groups at any one time.

So if a user is a member of Group A they are to be denied being added to Group B.

Any ideas and help greatly appreciated.

Thanks

Steve

Parents
  • Terrance is right. This is tricky.

    My algorithm would look like this:

    Setup an OnPreModify script handler

    Grab the proposed members from $Request

    Store the proposed members in a temporary array - e.g. $ProposedMembers

    Iterate through the members in $ProposedMembers

    Is this person already a member of the 'opposite' group?

    If yes, remove them from the $ProposedMembers array and log this

    If no, move on to the next member

    When done iterating, substitute your new $ProposedMembers for the original members array in the $Request.

    The section in the SDK about "Getting In-Process Property Values" will be helpful to you.
Reply
  • Terrance is right. This is tricky.

    My algorithm would look like this:

    Setup an OnPreModify script handler

    Grab the proposed members from $Request

    Store the proposed members in a temporary array - e.g. $ProposedMembers

    Iterate through the members in $ProposedMembers

    Is this person already a member of the 'opposite' group?

    If yes, remove them from the $ProposedMembers array and log this

    If no, move on to the next member

    When done iterating, substitute your new $ProposedMembers for the original members array in the $Request.

    The section in the SDK about "Getting In-Process Property Values" will be helpful to you.
Children
No Data