Adding Flow Action to check user group membership #235
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check User Group Membership Flow Action
This Flow Action is designed to dynamically check if a given user belongs to specified groups based on the provided conditions (
ORorAND). It can be used in workflows to make decisions based on group membership, enabling different processes to execute depending on the user's group associations.Features
sys_user_grmembertable.ORandANDconditions for group membership checks:OR: The user needs to belong to at least one of the specified groups.AND: The user must belong to all the specified groups.Inputs
Operator(String): The condition to check group membership. AcceptsORorAND.Groups(Array): A list of group names or IDs to check against.User SysId(String, Optional): The user ID to check. Defaults to the logged-in user.Outputs
Is Member ?(Boolean): Indicates whether the user satisfies the group membership condition.Is Success ?(Boolean): Indicates whether the operation was successful.Example Use Case
Decision Making in a Flow:
- If a user belongs to a specific group, execute Process A.
- Otherwise, execute Process B.
Error Handling
If an error occurs during the execution, the following outputs are set:
Is Member ?:falseIs Success ?:falseThe error details are logged for debugging purposes.
How to Use
operator: SpecifyORorAND.groups: List of group names or IDs.user(optional): Specify a user ID or leave it blank to use the logged-in user.Is Member ?andIs Success ?) to control the flow logic.