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