Package org.osforce.connect.entity.system

Examples of org.osforce.connect.entity.system.Permission


  public String doFormAction(@RequestParam Long siteId, @RequestParam Long categoryId,
      @RequestParam Long[] resourceIds, @RequestParam Long[] roleIds) {
    for(int i=0; i<resourceIds.length; i++) {
      Long resourceId = resourceIds[i];
      Long roleId = roleIds[i];
      Permission permission = permissionService.getPermission(resourceId, categoryId);
      if(permission==null) {
        permission = new Permission(resourceId, categoryId);
      }
      permission.setRoleId(roleId);
      permissionService.updatePermission(permission);
    }
    return String.format("redirect:/system/permission/list?siteId=%s", siteId);
  }
View Full Code Here


          return true;
        }
      }
    }
    //
    Permission permission = getPermission(resource, project.getCategoryId());
    if(permission==null) {
      return false;
    }
    return NumberUtils.compare(roleLevel, permission.getRole().getLevel()) <= 0;
  }
View Full Code Here

TOP

Related Classes of org.osforce.connect.entity.system.Permission

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.