Skip to content

Commit 8da7b78

Browse files
authored
Merge pull request #7558 from alkem-io/release-v0.80-patch1
Release v0.80.3 (Patch)
2 parents 8b0bfbe + d084c72 commit 8da7b78

File tree

6 files changed

+23
-5
lines changed

6 files changed

+23
-5
lines changed

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alkemio/client-web",
3-
"version": "0.80.2",
3+
"version": "0.80.3",
44
"description": "Alkemio client, enabling users to interact with Challenges hosted on the Alkemio platform.",
55
"repository": {
66
"type": "git",

src/core/apollo/generated/apollo-hooks.ts

+5
Original file line numberDiff line numberDiff line change
@@ -5650,6 +5650,11 @@ export function refetchCommunityVirtualMembersListQuery(
56505650

56515651
export const RoleSetAuthorizationDocument = gql`
56525652
query RoleSetAuthorization($roleSetId: UUID!) {
5653+
platform {
5654+
authorization {
5655+
myPrivileges
5656+
}
5657+
}
56535658
lookup {
56545659
roleSet(ID: $roleSetId) {
56555660
id

src/core/apollo/generated/graphql-schema.ts

+6
Original file line numberDiff line numberDiff line change
@@ -8921,6 +8921,12 @@ export type RoleSetAuthorizationQueryVariables = Exact<{
89218921

89228922
export type RoleSetAuthorizationQuery = {
89238923
__typename?: 'Query';
8924+
platform: {
8925+
__typename?: 'Platform';
8926+
authorization?:
8927+
| { __typename?: 'Authorization'; myPrivileges?: Array<AuthorizationPrivilege> | undefined }
8928+
| undefined;
8929+
};
89248930
lookup: {
89258931
__typename?: 'LookupQueryResults';
89268932
roleSet?:

src/domain/access/RoleSetAdmin/useRoleSetAdmin.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,12 @@ const useRoleSetAdmin = ({
100100
},
101101
skip: skip || !roleSetId,
102102
});
103-
103+
const platformPrivileges = roleSetDetails?.platform.authorization?.myPrivileges;
104104
const myPrivileges = roleSetDetails?.lookup.roleSet?.authorization?.myPrivileges;
105+
105106
const canReadRoleSet =
106-
(myPrivileges?.includes(AuthorizationPrivilege.Read) && myPrivileges?.includes(AuthorizationPrivilege.ReadUsers)) ??
107+
(myPrivileges?.includes(AuthorizationPrivilege.Read) &&
108+
platformPrivileges?.includes(AuthorizationPrivilege.ReadUsers)) ??
107109
false;
108110

109111
const validRoles = roleSetDetails?.lookup.roleSet?.roleNames;

src/domain/access/graphql/queries/RoleSetDetails.graphql

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
query RoleSetAuthorization(
22
$roleSetId: UUID!
33
) {
4+
platform {
5+
authorization {
6+
myPrivileges
7+
}
8+
}
49
lookup {
510
roleSet(ID: $roleSetId) {
611
id

0 commit comments

Comments
 (0)