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