Hi,
Well, the question says it all I think :)
I would like to check in a script if a given user has access to a given space. That is, I am iterating through the users of the confluence-uers group, and for each user I want to check if the user has access to e.g. space with key "ABCD".
The iteration works, it's only the space permission check that I do not know how to do that.
Any help appreciated,
Patrick
Think I found it:
import com.atlassian.confluence.security.PermissionHelper
def permissionHelper = ComponentLocator.getComponent(PermissionHelper)
if (permissionHelper.canView(user, space) {
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.