Skip to content

Commit

Permalink
Merge branch 'feature/shibui-2394' of bitbucket.org:unicon/shib-idp-u…
Browse files Browse the repository at this point in the history
…i into feature/shibui-2394
  • Loading branch information
rmathis committed Oct 28, 2022
2 parents 09e3657 + 79fd272 commit 3eb9058
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ public EntityDescriptorRepresentation createNew(EntityDescriptorRepresentation e

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

ownershipRepository.deleteEntriesForOwnedObject(ed);
ownershipRepository.save(new Ownership(userService.getCurrentUserGroup(), ed));
Expand All @@ -245,6 +248,9 @@ 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()) {
ed.setApproved(true);
}
EntityDescriptor savedEntity = entityDescriptorRepository.save(ed);
return createRepresentationFromDescriptor(savedEntity);
}
Expand Down

0 comments on commit 3eb9058

Please sign in to comment.