On Fri, 16 Jan 2004, Mark Lybarger wrote:
> i don't know if i have default group setup or not, but it doesn't seem to work i'm
> using:
>
> #set ($role = "Event")
> #if ($data.getACL().hasRole($role))
> User has role $role
> <br>
> #end
>
> where the user definately had that role in all their groups. and nothing is
> displayed. i try to add a group but again nothing:
>
> #set ($role = "Event")
> #set ($group = "Admin")
> #if ($data.getACL().hasRole($role,$group))
> User has role $role, $group
> <br>
> #end
>
> i am able to use the following:
>
> #set ($permission = "entry")
> #set ($group = "Admin")
> #if ( $data.getACL().hasPermission("entry","Admin") )
> User has permission ${permission}, group ${group}
>
> #end
>
> and it displays that the user has a particular permission in a group. does the
> getACL().hasRole( role, group) not work the way i'm using it?
>
I have only used role based security in my applications, so I'm not sure
if you are trying to assign users to a group and then roles to a group
- user -> group -> multiple roles
in my TURBINE_USER_GROUP_ROLE table I have multiple roles linked to
individual users
- user -> multiple roles
+---------+----------+---------+
| USER_ID | GROUP_ID | ROLE_ID |
+---------+----------+---------+
| 0 | 1 | 1 |
| 0 | 1 | 100 |
| 0 | 1 | 101 |
| 0 | 1 | 102 |
| 0 | 1 | 103 |
and the hasRole("roleName") works for me in that way. hopefully this is of
some help
--
Regards,
Jeffery Painter
- --
[EMAIL PROTECTED] http://kiasoft.com
PGP FP: 9CE8 83A2 33FA 32B1 0AB1 4E62 E4CB E4DA 5913 EFBC
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/qEQE5Mvk2lkT77wRAnMJAJ9vJ6qOkg/mvqqIpz7troCEQJ8bFACglu/U
YNXabx7DZOV2Hd9LwSTmGpY=
=dWiu
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]