code: public List<CmsRole> getRolesForResource(CmsRequestContext context, CmsUser user, CmsResource resource)
      throws CmsException {
  
          CmsDbContext dbc = m_dbContextFactory.getDbContext(context);
          List<CmsRole> result = null;
          try {
              result = m_driverManager.getRolesForResource(dbc, user, resource);
          } catch (Exception e) {
              dbc.report(
                  null,
                  Messages.get().container(
                      Messages.ERR_GET_ROLES_FOR_RESOURCE_2,
                      user.getName(),
                      context.getSitePath(resource)),
                  e);
          } finally {
              dbc.clear();
          }
          return result;
      }
docs: Returns all roles the given user has for the given resource.<p>
  
  @param context the current request context
  @param user the user to check
  @param resource the resource to check the roles for
  
  @return a list of {@link CmsRole} objects
  
  @throws CmsException is something goes wrong