Skip to content

Commit

Permalink
Merge pull request #7299 from alkem-io/release/async-vc
Browse files Browse the repository at this point in the history
Release / VC fixes
  • Loading branch information
valentinyanakiev committed Dec 10, 2024
1 parent 3fef4da commit bc098ab
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 22 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alkemio/client-web",
"version": "0.78.0",
"version": "0.78.1",
"description": "Alkemio client, enabling users to interact with Challenges hosted on the Alkemio platform.",
"repository": {
"type": "git",
Expand Down
10 changes: 0 additions & 10 deletions src/domain/community/community/CommunityAdmin/useCommunityAdmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
import {
AuthorizationPrivilege,
CommunityRoleType,
LicenseEntitlementType,
SearchVisibility,
SpaceLevel,
} from '@/core/apollo/generated/graphql-schema';
Expand All @@ -29,7 +28,6 @@ import { CommunityMemberUserFragmentWithRoles } from '@/domain/community/communi
import useInviteUsers from '@/domain/community/invitations/useInviteUsers';
import { getJourneyTypeName } from '@/domain/journey/JourneyTypeName';
import { Identifiable } from '@/core/utils/Identifiable';
import { useUserContext } from '@/domain/community/user';

const MAX_AVAILABLE_MEMBERS = 100;
const buildUserFilterObject = (filter: string | undefined) =>
Expand Down Expand Up @@ -89,13 +87,6 @@ const useRoleSetAdmin = ({ roleSetId, spaceId, challengeId, opportunityId, space
const leadRoleDefinition = roleSet?.leadRoleDefinition;
const roleSetMyPrivileges = roleSet?.authorization?.myPrivileges ?? [];

const { accountEntitlements } = useUserContext();

const entitlements = {
virtualContributorsEnabled: accountEntitlements.some(
priv => priv === LicenseEntitlementType.AccountVirtualContributor
),
};
const permissions = {
canAddMembers: roleSetMyPrivileges.some(priv => priv === AuthorizationPrivilege.CommunityAddMember),
// the following privilege allows Admins of a space without CommunityAddMember privilege, to
Expand Down Expand Up @@ -512,7 +503,6 @@ const useRoleSetAdmin = ({ roleSetId, spaceId, challengeId, opportunityId, space
memberRoleDefinition,
leadRoleDefinition,
permissions,
entitlements,
applications: roleSetPending?.applications,
invitations: roleSetPending?.invitations,
platformInvitations: roleSetPending?.platformInvitations,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const AdminOpportunityCommunityPage: FC<SettingsPageProps> = ({ routePrefix = '.
memberRoleDefinition,
leadRoleDefinition,
permissions,
entitlements,
onUserLeadChange,
onUserAuthorizationChange,
onOrganizationLeadChange,
Expand Down Expand Up @@ -81,7 +80,7 @@ const AdminOpportunityCommunityPage: FC<SettingsPageProps> = ({ routePrefix = '.
/>
</PageContentBlock>
</PageContentColumn>
{entitlements.virtualContributorsEnabled && (
{
<PageContentColumn columns={6}>
<PageContentBlock>
<CommunityVirtualContributors
Expand All @@ -98,7 +97,7 @@ const AdminOpportunityCommunityPage: FC<SettingsPageProps> = ({ routePrefix = '.
/>
</PageContentBlock>
</PageContentColumn>
)}
}
</PageContent>
</SubspaceSettingsLayout>
);
Expand Down
5 changes: 2 additions & 3 deletions src/domain/journey/space/pages/AdminSpaceCommunityPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const AdminSpaceCommunityPage = ({ routePrefix = '../' }: SettingsPageProps) =>
memberRoleDefinition,
leadRoleDefinition,
permissions,
entitlements,
onApplicationStateChange,
onInvitationStateChange,
onDeleteInvitation,
Expand Down Expand Up @@ -263,7 +262,7 @@ const AdminSpaceCommunityPage = ({ routePrefix = '../' }: SettingsPageProps) =>
/>
</PageContentBlock>
</PageContentColumn>
{entitlements.virtualContributorsEnabled && (
{
<PageContentColumn columns={6}>
<PageContentBlock>
<CommunityVirtualContributors
Expand All @@ -281,7 +280,7 @@ const AdminSpaceCommunityPage = ({ routePrefix = '../' }: SettingsPageProps) =>
/>
</PageContentBlock>
</PageContentColumn>
)}
}
</PageContent>
</SpaceSettingsLayout>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ const AdminSubspaceCommunityPage: FC<SettingsPageProps> = ({ routePrefix = '../'
memberRoleDefinition,
leadRoleDefinition,
permissions,
entitlements,
onApplicationStateChange,
onInvitationStateChange,
onDeleteInvitation,
Expand Down Expand Up @@ -203,7 +202,7 @@ const AdminSubspaceCommunityPage: FC<SettingsPageProps> = ({ routePrefix = '../'
/>
</PageContentBlock>
</PageContentColumn>
{entitlements.virtualContributorsEnabled && (
{
<PageContentColumn columns={6}>
<PageContentBlock>
<CommunityVirtualContributors
Expand All @@ -220,7 +219,7 @@ const AdminSubspaceCommunityPage: FC<SettingsPageProps> = ({ routePrefix = '../'
/>
</PageContentBlock>
</PageContentColumn>
)}
}
</PageContent>
</SubspaceSettingsLayout>
);
Expand Down

0 comments on commit bc098ab

Please sign in to comment.