Thanks for all your help and suggestions. I have managed to resolve the issue with 
ACLs but have uncovered a slightly more troubling problem. The solution was to use
denyUser.setNegative( true ) for "/slide/users/john". There was no need to deny the 
other roles like user.

However, I now find that I cannot delete a file once I have set any permissions on it. 
For example the code below:

res.putMethod("/slide/files/testFile5.txt","test data");
Ace denyJohn = new Ace( "/slide/users/john" );
denyJohn.addPrivilege( Privilege.READ );
denyJohn.setNegative( true );                           
Ace[] aces = new Ace[1];
aces[0] = denyJohn;
res.aclMethod( "/slide/files/testFile5.txt" , aces );
res.deleteMethod("/slide/files/"+filename);
                                
Causes the following exception
14:46:54,162 INFO  [STDOUT] java.lang.NullPointerException
14:46:54,162 INFO  [STDOUT]     at org.apache.slide.store.impl.rdbms.StandardRDB
MSAdapter.revokePermission(StandardRDBMSAdapter.java:584)
14:46:54,162 INFO  [STDOUT]     at org.apache.slide.store.impl.rdbms.AbstractRDB
MSStore.revokePermission(AbstractRDBMSStore.java:481)
14:46:54,162 INFO  [STDOUT]     at org.apache.slide.store.AbstractStore.revokePe
rmission(AbstractStore.java:759)
14:46:54,162 INFO  [STDOUT]     at org.apache.slide.store.ExtendedStore.revokePe
rmission(ExtendedStore.java:658)
14:46:54,162 INFO  [STDOUT]     at org.apache.slide.security.SecurityImpl.revoke
Permission(SecurityImpl.java:383)
14:46:54,162 INFO  [STDOUT]     at org.apache.slide.macro.MacroImpl.deleteObject
(MacroImpl.java:814)

Looking at the source for StandardRDBMSAdapter, it appears that the NullPointer is 
being thrown here:
statement.setString(4, revisionNumber.toString());

I would guess this is because revisionNumber is null.   

It might be worth pointing out that I can put and delete files where I have not set 
permissions as described above.

I would value any suggestions as to why this is occuring.

Thanks in advance

Patrick


-----Original Message-----
From: Oliver Zeigermann [mailto:[EMAIL PROTECTED]
Sent: Tue 10/5/2004 8:18 AM
To: Slide Users Mailing List
Subject: Re: Setting ACLs on a file via WebdavResource
 
Sounds very reasonable! Besides me saying that the user may still have 
access because the role may if is not possible. Confusing...

Oliver

Tassos Bassoukos schrieb:

>>Ace denyUser = new Ace( "/slide/roles/user" );
>>denyUser.addPrivilege( Privilege.READ );
>>denyUser.setNegative( false );
> 
> 
> Hi all,
> I don't know much about permissions yet, but should'nt the last line be
>   denyUser.setNegative( true );
> ?
> 
> At least that's what I've undestood from reading the source.
> 
> Cheers,
> Tassos Bassoukos
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to