File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
server/src/main/java/invite/api Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 11package invite .api ;
22
33import invite .config .Config ;
4+ import invite .exception .InvalidInputException ;
45import invite .exception .NotFoundException ;
56import invite .exception .UserRestrictionException ;
67import invite .logging .AccessLogger ;
@@ -151,7 +152,9 @@ public ResponseEntity<List<Role>> rolesPerApplicationId(@PathVariable("manageId"
151152 public ResponseEntity <Role > newRole (@ Validated @ RequestBody Role role ,
152153 @ Parameter (hidden = true ) User user ) {
153154 LOG .debug (String .format ("POST /roles/ for user %s" , user .getEduPersonPrincipalName ()));
154-
155+ if (role .getId () != null ) {
156+ throw new InvalidInputException ("Role id must be null for new Role" );
157+ }
155158 UserPermissions .assertAuthority (user , Authority .INSTITUTION_ADMIN );
156159 //For super_users we allow an organization GUID from the input form
157160 if (InstitutionAdmin .isInstitutionAdmin (user )) {
You can’t perform that action at this time.
0 commit comments