You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Andrey Shulinsky <as...@arnoldworldwide.ca> on 2004/02/26 01:29:17 UTC

How to add/remove a user - role relationship

Hi, all!

I've started to use Slide API in my app and got a couple of questions. After
looking into this mailing list and Slide code I've made some assumptions, if
somebody could confirm/contradict/complete them, it would be really
appreciated.

Use case: one wants to add/remove a user-role relationship
1) This can't be done directly via the Slide API. Security interface can
only check whether or not the current user has the specified role, enumerate
all roles but can't assign a role to a user. And I haven't found anything in
the other classes as well. Have I missed anything?
2) Two properties of the principal resources can be used to implement this
relationship: DAV:group-member-set and DAV:group-membership. But it looks
like only one of them - DAV:group-member-set - is actually used in methods
getGroupMembership (ACLSecurityImpl class)
matchPrincipal (SecurityImpl class)
that provide the information about actual group membership.
So to add/remove a user-role relationship I should change the
group-membership property value of a corresponding Role Node, shouldn't I?
3) The best way to do it is to use an XMLValue object created from this
property value, right?
Thanks.

Sincerely yours,
Andrey.


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org