You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Krishan Senevirathne <kr...@gmail.com> on 2011/08/03 13:56:29 UTC
Adding permissions in the database table
Hi, I'm new to apache shiro and I found out this is really an awesome
project.
But I'm having a problem while going through some stuff.
I'm having a db table called role_permissions which has columns "role" and
"permission".
My problem is how can I add multiple permissions to a role with out
duplicating role name.
I tried adding multiple permissions separated by a comma. But it doesn't
work.
Thanks in advance...
Cheers
Krishan
Re: Adding permissions in the database table
Posted by Krishan <kr...@gmail.com>.
Thanks for the quick reply..
Actually that sounds ok. I thought that I can give permissions separated by
a comma since that is the way used if I'm using the ini file for
role-permission mapping
I have no particular reason that can't duplicate roles, but I thought when
working with a big application that might cause the table to become larger
--
View this message in context: http://shiro-user.582556.n2.nabble.com/Adding-permissions-in-the-database-table-tp6648454p6651462.html
Sent from the Shiro User mailing list archive at Nabble.com.
Re: Adding permissions in the database table
Posted by Jared Bunting <ja...@peachjean.com>.
I'm assuming that you're using the JdbcRealm. My initial answer is, add one
row per role->permission mapping, and don't worry about duplicating roles.
But, perhaps if you could explain a bit about why you are trying to avoid
duplicating roles, we could try to address that problem.
-Jared
On Aug 3, 2011 6:57 AM, "Krishan Senevirathne" <kr...@gmail.com>
wrote:
Hi, I'm new to apache shiro and I found out this is really an awesome
project.
But I'm having a problem while going through some stuff.
I'm having a db table called role_permissions which has columns "role" and
"permission".
My problem is how can I add multiple permissions to a role with out
duplicating role name.
I tried adding multiple permissions separated by a comma. But it doesn't
work.
Thanks in advance...
Cheers
Krishan