use of org.eclipse.sw360.datahandler.thrift.users.UserGroup in project sw360portal by sw360.
the class WhenComputePermissions method the_highest_allowed_action_is_computed_for_user_$_with_user_group_$_and_department_$.
public WhenComputePermissions the_highest_allowed_action_is_computed_for_user_$_with_user_group_$_and_department_$(@Quoted String userEmail, @TEnumToString UserGroup userGroup, @Quoted String userDept) {
final User user = new User(DUMMY_ID, userEmail, userDept).setUserGroup(userGroup);
final DocumentPermissions<Project> projectDocumentPermissions = PermissionUtils.makePermission(project, user);
allowedActions = projectDocumentPermissions.getAllAllowedActions();
return self();
}
use of org.eclipse.sw360.datahandler.thrift.users.UserGroup in project sw360portal by sw360.
the class WhenComputeVisibility method the_visibility_is_computed_for_department_$_and_user_group_$.
public WhenComputeVisibility the_visibility_is_computed_for_department_$_and_user_group_$(@Quoted String department, @TEnumToString UserGroup userGroup) {
final User user = new User(DUMMY_ID, DUMMY_MAIL, department).setUserGroup(userGroup);
isVisible = ProjectPermissions.isVisible(user).test(project);
return self();
}