Search in sources :

Example 1 with ComponentIF

use of com.runwaysdk.ComponentIF in project geoprism-registry by terraframe.

the class SearchService method assignAllPermissions.

private void assignAllPermissions(Roles role, ComponentIF... components) {
    RoleDAO roleDAO = (RoleDAO) BusinessFacade.getEntityDAO(role);
    for (ComponentIF component : components) {
        roleDAO.grantPermission(Operation.CREATE, component.getOid());
        roleDAO.grantPermission(Operation.DELETE, component.getOid());
        roleDAO.grantPermission(Operation.WRITE, component.getOid());
        roleDAO.grantPermission(Operation.WRITE_ALL, component.getOid());
        roleDAO.grantPermission(Operation.READ, component.getOid());
        roleDAO.grantPermission(Operation.READ_ALL, component.getOid());
    }
}
Also used : RoleDAO(com.runwaysdk.business.rbac.RoleDAO) ComponentIF(com.runwaysdk.ComponentIF)

Aggregations

ComponentIF (com.runwaysdk.ComponentIF)1 RoleDAO (com.runwaysdk.business.rbac.RoleDAO)1