Skip to content

Commit a246605

Browse files
Create Readme.md
Copy Source User Group Memberships to Selected Users
1 parent bb5d494 commit a246605

File tree

1 file changed

+12
-0
lines changed
  • Server-Side Components/Background Scripts/Copy Source User Group Memberships to Selected Users

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Background Script — Copy Source User’s Groups to Specific Users
2+
3+
Working:
4+
It retrieves all groups of the source user.
5+
Loops through all active users (except the source).
6+
Checks whether the user is already a member of that group.
7+
If not, it inserts a new record in sys_user_grmember.
8+
9+
Note:
10+
sourceUserSysId → sys_id of the user whose groups you want to copy.
11+
The 3 entries in targetUserSysIds → sys_ids of the target users.
12+
It checks for duplicates, so no errors even if the user is already in that group.

0 commit comments

Comments
 (0)