|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package Permissions;
import java.security.Principal;
import org.jboss.seam.security.permission.PermissionCheck;
import org.jboss.seam.security.Role;
/******************************************************************************************
This rule supports the administration of users and roles using Seam's identity management.
******************************************************************************************/
rule ManageAccount
no-loop
// The first rule in an activation-group to fire will cancel the
// other rules activations (stop them from firing). The activation
// group can be any string, as long as the string is identical for
// all the rules you need to be in the one group.
activation-group "permissions"
when
$perm: PermissionCheck(name == "seam.user" || == "seam.role", granted == false)
Role(name == "admin")
then
$perm.grant();
end
/******************************************************************************************
This rules supports the administration of users and roles using Seam's identity management.
******************************************************************************************/
|