code: public boolean hasRoleForResource(CmsRequestContext context, CmsUser user, CmsRole role, CmsResource resource) {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          boolean result;
          try {
              result = hasRoleForResource(dbc, user, role, resource);
          } finally {
              dbc.clear();
          }
          return result;
      }
docs: Checks if the given user has the given role for the given resource.<p>
  
  @param context the current request context
  @param user the user to check
  @param role the role to check
  @param resource the resource to check the role for
  
  @return <code>true</code> if the given user has the given role for the given resource