Hello there,
I'm trying to build a code snippet using Power Script for Confluence for bulk addition for users to a Confluence space. Below is my code snippet for adding user "sample" to a space with key "TEST". This script always returns a false value and the user is not assigned to the space with the mentioned permission.
string loglevel = "WARN";
logPrint(loglevel, addUserToSpacePermission("VIEWSPACE", "TEST", "sample"));
But after, adding the user to space manually, the below code snippet work fine in removing the user from space.
string loglevel = "WARN";
logPrint(loglevel, removeUserFromSpacePermission("VIEWSPACE", "TEST", "sample"));
Could you please help me in adding user to space using the script?
Regards,
Poojaa
Hey @Poojaa Sudhakaran , assuming you've got all the parameters correct, this should work just fine. The only reason I see that it doesn't work is that your user "sample" is also a member of a group that already has the VIEWSPACE permission.
Hope it helps.
IL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.