Skip to content

Commit

Permalink
SHIBUI-2394
Browse files Browse the repository at this point in the history
Incremental commit
  • Loading branch information
chasegawa committed Sep 30, 2022
1 parent af200b1 commit 5722aa8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ public class ActivateController {

@PatchMapping(path = "/entityDescriptor/{resourceId}/{mode}")
@Transactional
public ResponseEntity<?> enableEntityDescriptor(@PathVariable String resourceId, @PathVariable String mode) throws
PersistentEntityNotFound, ForbiddenException {
public ResponseEntity<?> enableEntityDescriptor(@PathVariable String resourceId, @PathVariable String mode) throws PersistentEntityNotFound, ForbiddenException {
boolean status = "enable".equalsIgnoreCase(mode);
EntityDescriptorRepresentation edr = entityDescriptorService.updateEntityDescriptorEnabledStatus(resourceId, status);
return ResponseEntity.ok(edr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@

public class EntityDescriptorRepresentation implements Serializable {
private static final long serialVersionUID = 7753435553892353966L;

@Setter
@Getter
private boolean approved;

private DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSSSS");

private List<AssertionConsumerServiceRepresentation> assertionConsumerServices;
Expand Down Expand Up @@ -247,4 +252,4 @@ public void setServiceProviderSsoDescriptor(ServiceProviderSsoDescriptorRepresen
public void setVersion(int version) {
this.version = version;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,7 @@ public void updateDescriptorFromRepresentation(org.opensaml.saml.saml2.metadata.
}

@Override
public EntityDescriptorRepresentation updateEntityDescriptorEnabledStatus(String resourceId, boolean status) throws
PersistentEntityNotFound, ForbiddenException {
public EntityDescriptorRepresentation updateEntityDescriptorEnabledStatus(String resourceId, boolean status) throws PersistentEntityNotFound, ForbiddenException {
EntityDescriptor ed = entityDescriptorRepository.findByResourceId(resourceId);
if (ed == null) {
throw new PersistentEntityNotFound("Entity with resourceid[" + resourceId + "] was not found for update");
Expand Down
5 changes: 3 additions & 2 deletions backend/src/main/resources/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ label.new-group=New Group
label.new-attribute=New Custom Entity Attribute
label.edit-group=Edit Group

label.approved=Approved
label.metadata-source=Metadata Source
label.metadata-sources=Metadata Sources
label.metadata-provider=Metadata Provider
Expand Down Expand Up @@ -629,6 +630,7 @@ message.session-timeout-heading=Session timed out
message.session-timeout-body=Your session has timed out. Please login again.
message.session-timeout=An error has occurred while saving. Your session may have timed out.

tooltip.approved=Metadata Source is approved and can be enabled by authorized enabler
tooltip.entity-id=An entityID is the SAML identifier that uniquely names a service provider.
tooltip.service-provider-name=Service Provider Name (Dashboard Display Only)
tooltip.force-authn=Disallows use (or reuse) of authentication results and login flows that don\u0027t provide a real-time proof of user presence in the login process
Expand Down Expand Up @@ -792,5 +794,4 @@ value.algorithm-cbc-192=CBC (192) - http://www.w3.org/2001/04/xmlenc#aes192-cbc
value.algorithm-cbc-128=CBC (128) - http://www.w3.org/2001/04/xmlenc#aes128-cbc
value.algorithm-cbc-tripledes=CBC (TRIPLEDES) - http://www.w3.org/2001/04/xmlenc#tripledes-cbc

message.algorithms-unique=Each algorithm may only be used once.

message.algorithms-unique=Each algorithm may only be used once.
5 changes: 5 additions & 0 deletions backend/src/main/resources/metadata-sources-ui-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"entityId"
],
"properties": {
"approved": {
"title": "label.approved",
"description": "tooltip.approved",
"type": "boolean"
},
"serviceProviderName": {
"title": "label.service-provider-name",
"description": "tooltip.service-provider-name",
Expand Down

0 comments on commit 5722aa8

Please sign in to comment.