I took a look at flux source......

When you update a permission ......you call
 
 TurbineSecurity.savePermission(permission).........


but when you savePermission(permission) it checks if the permissio exists (using the 
name as key)...
it will not exists cause my permission name has changed 

But what I am doing is a little bit different ..........
when I'm updating a permission  i'm trying 
/// gets the realname of the permission from a hidden field in form
 String realname = data.getParameters().getString("realname");
 ///gets the newname from form
String newname = data.getParameters().getString("newname");
///gets the permission object 
 Permission perm = TurbineSecurity.getPermission(realname);
/// rename the perm
 perm.rename(newname);


This perm.rename() calls the method from DBSecurityService.rename(perm,name)

the problem is ....DBSecurityService.rename is not working right!!!





Diogo Saad wrote:
> 
>     I'm doing a manager so that I can change my Users/Roles/Permissions via web.
>     I'm trying to remove a permission....
> The problem is that when I call TurbineSecurity.removerPermission(permname)
> it only removes the named permission from the TURBINE_PERMISSION table , leaving the 
>perm in TURBINE_ROLE_PERMISSION table....
> 
> What's wrong ?? I couldn't find in TurbineSecurity Fascade a method that does it 
>right......... Do I have to delete by hand (I mean .....using 
>TURBINE_ROLE_PERMISSION(peer))???
> 
> Diogo
> 
> Permission perm = 
>TurbineSecurity.getPermission(data.getParameters().get("realname"));
>    TurbineSecurity.removePermission(perm);

Look at the jakarta-turbine-flux cvs module for examples on how to use
the security system.

-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]




Reply via email to