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 Wong Kam Lai <kl...@onk.cintec.cuhk.edu.hk> on 2003/04/22 11:10:29 UTC

Something about delete permission

I've tried for deleting permission and have some investigation, correct me
if I'm wrong.

I found that there are two sets of API to deal with delete permission...
one is 
1. Get AclProperty acl by webdavResource.aclfindMethod(path);
2. Get Aces from acl.getAces();
3. Find the right Ace by checking whether they have the same principal
etc.
4. call Ace's removePrivilege(privilege) to remove the permission.

I think it mainly affects the memory, so it is okay for immediately effect
and can't remain the result after reboot the server, the result is resumed
by the database.

Second one is about security's revokePermssion() method, it calls the
corresponding Store, 'JDBCDescriptorsStore or MySQLDescriptorsStore or
other related store' to delete the permssion from database. However, it
doesn't relate to the memory, therefore, as I need to read the permission
from memory, it has no immediately effect. But it takes effect when
restart tomcat..

So, in order to have immediately effect and can last after reboot
server. I use these two sets of API together ..


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


Re: Something about delete permission

Posted by Wong Kam Lai <kl...@onk.cintec.cuhk.edu.hk>.
On Tue, 22 Apr 2003, Wong Kam Lai wrote:

> I've tried for deleting permission and have some investigation, correct me
> if I'm wrong.
> 
> I found that there are two sets of API to deal with delete permission...
> one is 
> 1. Get AclProperty acl by webdavResource.aclfindMethod(path);
> 2. Get Aces from acl.getAces();
> 3. Find the right Ace by checking whether they have the same principal
> etc.
> 4. call Ace's removePrivilege(privilege) to remove the permission.
> 
> I think it mainly affects the memory, so it is okay for immediately effect
> and can't remain the result after reboot the server, the result is resumed
> by the database.
> 
> Second one is about security's revokePermssion() method, it calls the
> corresponding Store, 'JDBCDescriptorsStore or MySQLDescriptorsStore or
> other related store' to delete the permssion from database. However, it
> doesn't relate to the memory, therefore, as I need to read the permission
> from memory, it has no immediately effect. But it takes effect when
> restart tomcat..
> 
> So, in order to have immediately effect and can last after reboot
> server. I use these two sets of API together ..
Also, I find that if I have the following situation

/cnc ..some permission
/cnc/abc ....some permission
/cnc/efd ....some permission

if I want to erase the permission for /cnc, actually, I need to erase all
permissions under /cnc, but now there seems no api to do so, I need to get
all children of /cnc and erase them one by one

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


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