Skip to content

Commit

Permalink
SHIBUI-2394
Browse files Browse the repository at this point in the history
SHIBUI-2447 fixed issue with items with no defined approvers needing approval
  • Loading branch information
chasegawa committed Nov 2, 2022
1 parent 7e19acc commit 5c20b23
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public EntityDescriptorRepresentation createNew(EntityDescriptorRepresentation e

EntityDescriptor ed = (EntityDescriptor) createDescriptorFromRepresentation(edRep);
ed.setIdOfOwner(userService.getCurrentUserGroup().getOwnerId());
if (userService.currentUserIsAdmin()) {
if (userService.currentUserIsAdmin() || userService.getCurrentUserGroup().getApproversList().isEmpty()) {
ed.setApproved(true);
}

Expand All @@ -250,7 +250,7 @@ public EntityDescriptorRepresentation createNewEntityDescriptorFromXMLOrigin(Ent
if (ed.getProtocol() == EntityDescriptorProtocol.OIDC) {
ed.getSPSSODescriptor("").addSupportedProtocol("http://openid.net/specs/openid-connect-core-1_0.html");
}
if (userService.currentUserIsAdmin()) {
if (userService.currentUserIsAdmin() || userService.getCurrentUserGroup().getApproversList().isEmpty()) {
ed.setApproved(true);
}
EntityDescriptor savedEntity = entityDescriptorRepository.save(ed);
Expand Down

0 comments on commit 5c20b23

Please sign in to comment.