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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.