Oliver
Patrick van Kann schrieb:
The problem goes away if I use the standard TxFile stores (as in the out-of-the-box distrib).
So it seems that this problem is specific to the either J2EEStore, SQLServerRDBMSAdapter or the standard/abstract RDBMSadapters from which the SQLServerAdapter is derived.
I am going to try: 1) Plain SQLServerAdapter (eliminate J2EEStore as the problem) 2) Plain MySQL (eliminate SQLServer as the problem).
I'll let you know what else I find out.
Thanks,
Patrick
-----Original Message-----
From: Patrick van Kann [mailto:[EMAIL PROTECTED]
Sent: Tue 10/5/2004 3:30 PM
To: Slide Users Mailing List
Subject: RE: Setting ACLs on a file via WebdavResource
I don't know why revision number is null. I'm not sure what it has to do with me setting permissions, unless the act of setting a permission is considered a revision.
What more could I do to assist in debugging this?
Patrick
-----Original Message-----
From: Oliver Zeigermann [mailto:[EMAIL PROTECTED]
Sent: Tue 10/5/2004 3:19 PM
To: Slide Users Mailing List
Subject: Re: Setting ACLs on a file via WebdavResource
Any idea why the revision number is null? It really should not...
Oliver
Patrick van Kann schrieb:
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]
--------------------------------------------------------------------- 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]
