On 7/25/07, Vincent Massol <vincent@massol.net> wrote:

On Jul 25, 2007, at 2:34 PM, Asiri Rathnayake wrote:

[snip]

2.  How can i check whether a certain RPC invocation have admin rights ? (A simple code sample would be greate!!!)

You don't check, you simply know it... :)

Meaning if the user wants to remove a space you first check if he has admin rights (do we have an API for this? If not we should probably add it) and if so calls the removeSpace method.

Confluence API has a lot of methods for such tasks (in security section), but non of them are implemented (not even mentioned) in our implementation. so, we'll have to work on it. 

Hmm... I wonder if we'll be able to implement fully the Confluence spec. This will be a good test. For example:

Vector getPermissions(String token, String spaceKey) - Returns a Vector of Strings representing the permissions the current user has for this space (a list of "view", "modify", "comment" and / or "admin").

This means that we need to support the confluence "token"s if we want XMLRPC client tools to work seamlessly with XWiki. Which means we need a good mapping between Confluence permissions and XWiki permissions.

So it means we need to support calling: getPermissions("modify") and getPermissions("edit") both need to work.

I'll be happy to work on this when we're done with XEclipse :)

Thanks.

- Asiri

-Vincent



--
You receive this message as a subscriber of the xwiki-dev@objectweb.org mailing list.
To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org
For general help: mailto: sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws