<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type></HEAD>
<BODY bgColor=#ffffff text=#000000>
<DIV>
<DIV style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">Is it possible To aggregate permissions under roles.<BR><BR>This makes it easier To grant roles To A user and thereby A large set OF permissions.<BR></DIV></DIV>
<DIV dir=ltr>
<HR>
<SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">From: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif"><A href="mailto:sbryzak@redhat.com">Shane Bryzak</A></SPAN><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">Sent: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">2014-06-05 01:29</SPAN><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">To: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif"><A href="mailto:security-dev@lists.jboss.org">security-dev@lists.jboss.org</A></SPAN><BR><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif; FONT-WEIGHT: bold">Subject: </SPAN><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: Calibri,sans-serif">Re: [security-dev] Permission and Role</SPAN><BR><BR></DIV>
<DIV class=moz-cite-prefix>Hi Rahul,<BR><BR>They are fundamentally two very different things. A role is typically used to define a set of users for which specific privileges are to be assigned, while a permission is used to control access to application resources or services. A permission check can actually use the user's roles to determine whether the user has the necessary privilege to perform an action. Here's a couple of pseudo-code examples to make this a little clearer:<BR><BR><BR>1. Restricting access to a method based on the user's role:<BR><BR>@RolesAllowed("admin")<BR>public void doProtectedOperation() {<BR> ...<BR>}<BR><BR>2. Restricting access to a method to users with permission to cancel a specific "order":<BR><BR>public void cancelOrder(@HasPermission("cancel") Order order) {<BR> ...<BR>}<BR><BR>Hope that helps!<BR><BR>Shane<BR><BR>On 06/05/2014 09:13 AM, Rahul Mahindrakar wrote:<BR></DIV>
<BLOCKQUOTE cite=mid:CACkztbRk1prtvtBQJc8qHVygTjFMdZooKyK3-m3QOYssXuU3rA@mail.gmail.com type="cite">
<DIV dir=ltr>
<DIV>
<DIV>
<DIV>Hi<BR><BR></DIV>I have not been able to have a grasp of the difference between the usage of Role and permissions.<BR><BR></DIV>Can someone guide me in this direction<BR><BR></DIV>Thanks<BR>Rahul <BR></DIV><BR>
<FIELDSET class=mimeAttachmentHeader></FIELDSET> <BR><PRE wrap="">_______________________________________________
security-dev mailing list
<A class=moz-txt-link-abbreviated href="mailto:security-dev@lists.jboss.org">security-dev@lists.jboss.org</A>
<A class=moz-txt-link-freetext href="https://lists.jboss.org/mailman/listinfo/security-dev">https://lists.jboss.org/mailman/listinfo/security-dev</A></PRE></BLOCKQUOTE><BR></BODY></HTML>