use of org.finos.waltz.model.permission_group.Permission in project waltz by khartec.
the class PermissionGroupService method findPermissions.
public List<Permission> findPermissions(EntityReference parentEntityRef, String username) {
Person person = personService.getPersonByUserId(username);
if (isNull(person)) {
return Collections.emptyList();
}
List<Involvement> involvements = involvementService.findByEmployeeId(person.employeeId()).stream().filter(involvement -> involvement.entityReference().equals(parentEntityRef)).collect(Collectors.toList());
if (involvements.isEmpty()) {
return Collections.emptyList();
}
return permissionGroupDao.getDefaultPermissions();
}
Aggregations