use of com.haulmont.restapi.data.PermissionInfo in project cuba by cuba-platform.
the class PermissionsControllerManager method getPermissionInfos.
public Collection<PermissionInfo> getPermissionInfos() {
Collection<PermissionInfo> result = new ArrayList<>();
for (PermissionType permissionType : PermissionType.values()) {
Map<String, Integer> permissionsMap = userSessionSource.getUserSession().getPermissionsByType(permissionType);
for (Map.Entry<String, Integer> entry : permissionsMap.entrySet()) {
String target = entry.getKey();
Integer value = entry.getValue();
PermissionInfo permissionInfo = new PermissionInfo(permissionType.name(), target, getPermissionValueStr(permissionType, value), value);
result.add(permissionInfo);
}
}
return result;
}
Aggregations