Skip to content

Commit 89cf48d

Browse files
committed
Added application identifier to Application Membership
1 parent 373c33a commit 89cf48d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

server/src/main/java/access/model/ApplicationMembership.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ public String getName() {
5454
return getClass().getName().concat(application.getName()).concat(authority.name());
5555
}
5656

57+
//We need info, about the application
58+
@JsonProperty(access = JsonProperty.Access.READ_ONLY, value = "applicationIdentifier")
59+
public Long getApplicatinIndentifier() {
60+
Application application = getApplication();
61+
if (application != null && Hibernate.isInitialized(application)) {
62+
return application.getId();
63+
}
64+
return null;
65+
}
66+
5767
@JsonProperty(value = "organizationMembershipIdentifier", access = JsonProperty.Access.READ_ONLY)
5868
public Long getOrganizationMembershipInfo() {
5969
OrganizationMembership organizationMembership = this.getOrganizationMembership();

0 commit comments

Comments
 (0)