code: public List<CmsRole> getRolesForResource(CmsObject cms, String userFqn, String resourceName) throws CmsException {
  
          CmsUser user = cms.readUser(userFqn);
          CmsResource resource = cms.readResource(resourceName, CmsResourceFilter.ALL);
          return m_securityManager.getRolesForResource(cms.getRequestContext(), user, resource);
      }
docs: Returns all roles the given user has over the given resource.<p>
  
  @param cms the current cms context
  @param userFqn the user name to check
  @param resourceName the resource name
  
  @return a list of {@link CmsRole} objects
  
  @throws CmsException if something goes wrong