code: public CmsPermissionSet getPermissions(String resourceName, String userName) throws CmsException {
  
          // reading permissions is allowed even if the resource is marked as deleted
          CmsResource resource = readResource(resourceName, CmsResourceFilter.ALL);
          CmsUser user = readUser(userName);
          return m_securityManager.getPermissions(m_context, resource, user);
      }
docs: Returns the set of permissions of a given user for a given resource.<p>
  
  @param resourceName the name of the resource
  @param userName the name of the user
  
  @return the current permissions on this resource
  
  @throws CmsException if something goes wrong