Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit cd5d16bd authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Small fixes

parent e8a0f419
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
[labelColumnContent]="searchGroupPanel">
<mat-tab-group #domainTabs
*ngIf="!!resourceList && resourceList.length>0;else noUserAdminGroupsDataFound"
*ngIf="!!resourceList && resourceList.length>0;else noUserAdminGroupsDataFound"
style="height: 100%">
<mat-tab>
<ng-template mat-tab-label>
......@@ -49,13 +49,13 @@
class="smp-no-data-panel"
icon="warning"
type="warning"
label="User is not administrator of any of the resources"></smp-warning-panel>
[label]="filterResourceResults?'No resources for give filter':'User is not administrator of any of the resources'"></smp-warning-panel>
</ng-template>
</div>
<ng-template #searchGroupPanel>
<div
*ngIf="!!resourceList && resourceList.length>0"
*ngIf="!!resourceList && resourceList.length>0 || filterResourceResults "
>
<mat-form-field style="width:100%">
<mat-label>Selected domain</mat-label>
......
......@@ -180,6 +180,10 @@ export class EditResourceComponent implements OnInit, BeforeLeaveGuard {
this.refreshResources();
}
get filterResourceResults():boolean {
return !!this.filter["filter"]
}
get disabledResourceFilter(): boolean {
return !this._selectedGroup;
}
......
......@@ -89,6 +89,7 @@ export class UserService {
.replace(SmpConstants.PATH_PARAM_ENC_CREDENTIAL_ID, credential.credentialId))
.subscribe((response: CredentialRo) => {
this.notifyAccessTokenUpdated(response)
this.alertService.success("Access token ["+response.name+"] has been deleted!")
}, error => {
if (this.httpErrorHandlerService.logoutOnInvalidSessionError(error)){
return;
......@@ -107,6 +108,7 @@ export class UserService {
.replace(SmpConstants.PATH_PARAM_ENC_CREDENTIAL_ID, credential.credentialId), credential)
.subscribe((response: CredentialRo) => {
this.notifyAccessTokenUpdated(response)
this.alertService.success("Access token ["+response.name+"] has been updated!")
}, error => {
if (this.httpErrorHandlerService.logoutOnInvalidSessionError(error)){
return;
......@@ -125,6 +127,7 @@ export class UserService {
.replace(SmpConstants.PATH_PARAM_ENC_CREDENTIAL_ID, credential.credentialId), credential)
.subscribe((response: CredentialRo) => {
this.notifyCertificateUpdated(response)
this.alertService.success("Certificate ["+response.name+"] has been updated!")
}, error => {
if (this.httpErrorHandlerService.logoutOnInvalidSessionError(error)){
return;
......@@ -143,6 +146,7 @@ export class UserService {
.replace(SmpConstants.PATH_PARAM_ENC_CREDENTIAL_ID, credential.credentialId))
.subscribe((response: CredentialRo) => {
this.notifyCertificateUpdated(response)
this.alertService.success("Certificate ["+response.name+"] has been deleted!")
}, error => {
if (this.httpErrorHandlerService.logoutOnInvalidSessionError(error)){
return;
......@@ -172,6 +176,7 @@ export class UserService {
.replace(SmpConstants.PATH_PARAM_ENC_CREDENTIAL_ID, credential.credentialId), credential)
.subscribe((response: CredentialRo) => {
this.notifyCertificateUpdated(response)
this.alertService.success("Certificate ["+response.name+"] has been successfully uploaded!")
}, error => {
if (this.httpErrorHandlerService.logoutOnInvalidSessionError(error)){
return;
......
......@@ -67,7 +67,7 @@ export class UserAccessTokensComponent implements BeforeLeaveGuard {
this.dialog.open(ConfirmationDialogComponent, {
data: {
title: "Delete Access token",
description: "Action will delete access token: " + credential.name + "!<br /><br />Do you wish to continue?"
description: "Action will delete access token: \"" + credential.name + "\"!<br /><br />Do you wish to continue?"
}
}).afterClosed().subscribe(result => {
if (result) {
......@@ -90,7 +90,7 @@ export class UserAccessTokensComponent implements BeforeLeaveGuard {
this.dialog.open(ConfirmationDialogComponent, {
data: {
title: "Update Access token",
description: "Action will update access token: " + credential.name + " data!<br /><br />Do you wish to continue?"
description: "Action will update access token: \"" + credential.name + "\"!<br /><br />Do you wish to continue?"
}
}).afterClosed().subscribe(result => {
if (result) {
......
......@@ -69,8 +69,8 @@ export class UserCertificatesComponent implements BeforeLeaveGuard {
public onDeleteItemClicked(credential: CredentialRo) {
this.dialog.open(ConfirmationDialogComponent, {
data: {
title: "Delete Access token",
description: "Action will delete access token: " + credential.name + "!<br /><br />Do you wish to continue?"
title: "Delete Certificate",
description: "Action will delete certificate: \"" + credential.name + "\"!<br /><br />Do you wish to continue?"
}
}).afterClosed().subscribe(result => {
if (result) {
......
......@@ -26,6 +26,7 @@ public class CPPUtils {
public static Certificate createCertificate(String certId, String keyInfoID) {
Certificate certificate = new Certificate();
certificate.setId(certId);
certificate.setKeyInfo(createCertificateKeyInfo(keyInfoID));
return certificate;
......@@ -47,6 +48,7 @@ public class CPPUtils {
public static KeyInfo createCertificateKeyInfo(String keyInfoId) {
KeyInfo keyInfo = new KeyInfo();
keyInfo.setId(keyInfoId);
ObjectFactory xmldSigObjectFactory = new ObjectFactory();
keyInfo.getContent().add(xmldSigObjectFactory.createKeyName("cn=" + keyInfoId));
X509Data data = new X509Data();
......
......@@ -93,7 +93,7 @@ public class OasisSMPServiceMetadata20Handler extends AbstractOasisSMPHandler {
endpoint.setAddressURI(new AddressURI());
endpoint.getAddressURI().setValue("http://test.ap.local/msh");
endpoint.setTransportProfileID(new TransportProfileID());
endpoint.getTransportProfileID().setValue("bdxr-transport-ebms3-as4-v1p0");
endpoint.getTransportProfileID().setValue("bdxr-transport-ebms3-as4-v2p0");
Certificate certEnc = new Certificate();
certEnc.setExpirationDate(new ExpirationDate());
certEnc.setActivationDate(new ActivationDate());
......@@ -105,7 +105,7 @@ public class OasisSMPServiceMetadata20Handler extends AbstractOasisSMPHandler {
certEnc.setContentBinaryObject(new ContentBinaryObject());
certEnc.getSubject().setValue("CN=test-ap-enc,OU=edelivery,O=digit,C=EU");
certEnc.getIssuer().setValue("CN=test-ap-enc,OU=edelivery,O=digit,C=EU");
certEnc.getTypeCode().setValue("encryption");
certEnc.getTypeCode().setValue("http://www.w3.org/2002/03/xkms#Exchange");
certEnc.getContentBinaryObject().setValue("Put the real certificate data here".getBytes());
certEnc.getContentBinaryObject().setMimeCode("application/base64");
......@@ -120,7 +120,7 @@ public class OasisSMPServiceMetadata20Handler extends AbstractOasisSMPHandler {
certSig.setIssuer(new Issuer());
certSig.getSubject().setValue("CN=test-ap-signature,OU=edelivery,O=digit,C=EU");
certSig.getIssuer().setValue("CN=test-ap-signature,OU=edelivery,O=digit,C=EU");
certSig.getTypeCode().setValue("signature");
certSig.getTypeCode().setValue("http://www.w3.org/2002/03/xkms#Signature");
certSig.getContentBinaryObject().setValue("Put the real certificate data here".getBytes());
certSig.getContentBinaryObject().setMimeCode("application/base64");
endpoint.getCertificates().add(certEnc);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment