コード例 #1
0
    @Override
    public boolean isAccessible(E resrep) {
      boolean ret = false;
      URI id = resrep.getId();

      Vcenter obj = _permissionsHelper.getObjectById(id, Vcenter.class);
      if (obj == null) {
        return false;
      }
      if (obj.getTenant().toString().equals(_user.getTenantId())
          || isSystemAdmin()
          || isSecurityAdmin()) {
        return true;
      }
      ret = isTenantAccessible(obj.getTenant());
      return ret;
    }
コード例 #2
0
 @Override
 protected URI getTenantOwner(URI id) {
   Vcenter vcenter = queryObject(Vcenter.class, id, false);
   return vcenter.getTenant();
 }