title: How to get permissions by name for each role a liferay user has
body: <p>I've been working on access control.So,In our liferay portlets,how can I get all permissions of a user,I've achieved getting roles of a user by </p>
  
  <pre><code>FacesContext facesContext = FacesContext.getCurrentInstance();
  PortletRequest request = (PortletRequest) facesContext
              .getExternalContext().getRequest(); 
  User user = (User) request.getAttribute(WebKeys.USER);  
  List&lt;Role&gt; roles = new ArrayList&lt;Role&gt;();
  
  roles.addAll(RoleLocalServiceUtil.getUserRoles(user.getUserId()));
  
  roles.addAll(RoleLocalServiceUtil.getUserRelatedRoles(user.getUserId(), user.getGroupIds()));
  </code></pre>
  
  <p>But I cant find any thing by which I can find if the given user has view/configuration/etc permissions with respect to the portlets.<code>getResourceResourcePermissions</code> gives me the permission but by ids,How can I find permissions with permission name i.e view/config/update</p>
  
  <p><code>liferay 6.2</code></p>