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 Russ <ru...@kikuze.com> on 2002/06/04 10:36:27 UTC

Deleting a user

Hi,
    I am trying to write code to delete a user from Slide but I face a 
problem which is I do not know how to remove the user's permissions. As 
enumeratePermissions only returns permissions on an ObjectNode, I need 
to enumerate the permissions on a SubjectNode to remove the users 
permissions from the database. Is there something I can use to get to 
those permissions? Thanks.

Russ


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Deleting a user

Posted by Russ <ru...@kikuze.com>.
Hi Lenz,
    actually I started with using the MacroHelper class but I found out 
that it did not remove the permissions. That's when I went on to try and 
enumerate the permissions and found that the results will be empty if I 
enumerated the permissions of eg. "/users/Ahmad" but is ok if I used eg. 
"/content/abc.txt".

    One thing I am doing differently is that when I create users, I 
create them only in the structure. I do not create them in content as I 
do not require any user properties to be stored. I hope this will not 
cause any problems? I have also met some initial problems creating users 
but after awhile was able to do so using the followig code :
-----------------------------
SlideToken slideToken = new SlideTokenImpl(new CredentialsToken("root"));
ObjectNode objectNode = new UserRoleImpl("0040000002");
structure.create(slideToken, objectNode, "/users" + objectNode.getUri());
-----------------------------
I am unsure if this "tweak" of mine will cause any internal problems. I 
will post my initial user creation problems to see if it can be resolved 
too. Thanks.

Russ


Christopher Lenz wrote:

>Hi Russ,
>
>that kind of operation is what the methods in org.apache.slide.macro.Macro are 
>for. Especially Macro.delete(...) will delete all permissions, property etc. 
>associated with the node to be deleted.
>
>For an example of deleting a user, look at the code in the admin web-app
>(src/admin). There's a DeleteUserAction in there IIRC.
>
>Am 04.06.2002 10:36:27, schrieb Russ <ru...@kikuze.com>:
>  
>
>>Hi,
>>   I am trying to write code to delete a user from Slide but I face a 
>>problem which is I do not know how to remove the user's permissions. As 
>>enumeratePermissions only returns permissions on an ObjectNode, I need 
>>to enumerate the permissions on a SubjectNode to remove the users 
>>permissions from the database. Is there something I can use to get to 
>>those permissions? Thanks.
>>
>>Russ
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>>For additional commands, e-mail: <ma...@jakarta.apache.org>
>>
>>
>>    
>>
>
>-chris
>_______________________________________________
> /=/ cmlenz at gmx.de
>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>


Re: Deleting a user

Posted by Christopher Lenz <cm...@gmx.de>.
Hi Russ,

that kind of operation is what the methods in org.apache.slide.macro.Macro are 
for. Especially Macro.delete(...) will delete all permissions, property etc. 
associated with the node to be deleted.

For an example of deleting a user, look at the code in the admin web-app
(src/admin). There's a DeleteUserAction in there IIRC.

Am 04.06.2002 10:36:27, schrieb Russ <ru...@kikuze.com>:
>Hi,
>    I am trying to write code to delete a user from Slide but I face a 
>problem which is I do not know how to remove the user's permissions. As 
>enumeratePermissions only returns permissions on an ObjectNode, I need 
>to enumerate the permissions on a SubjectNode to remove the users 
>permissions from the database. Is there something I can use to get to 
>those permissions? Thanks.
>
>Russ
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>

-chris
_______________________________________________
 /=/ cmlenz at gmx.de





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>