Skip to content

Commit

Permalink
fix access to public space for anonymous user
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinyanakiev committed Jan 27, 2025
1 parent 0183e84 commit 09ec9e7
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
11 changes: 9 additions & 2 deletions src/core/apollo/generated/apollo-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1718,7 +1718,7 @@ export const ContextJourneyDataFragmentDoc = gql`
export const RoleSetMemberUserFragmentDoc = gql`
fragment RoleSetMemberUser on User {
id
isContactable
isContactable @skip(if: $authorizedReadAccessCommunity)
profile {
id
displayName
Expand Down Expand Up @@ -5741,6 +5741,7 @@ export const RoleSetRoleAssignmentDocument = gql`
$includeUsers: Boolean = true
$includeOrganizations: Boolean = true
$includeVirtualContributors: Boolean = true
$authorizedReadAccessCommunity: Boolean = false
) {
lookup {
roleSet(ID: $roleSetId) {
Expand Down Expand Up @@ -5792,6 +5793,7 @@ export const RoleSetRoleAssignmentDocument = gql`
* includeUsers: // value for 'includeUsers'
* includeOrganizations: // value for 'includeOrganizations'
* includeVirtualContributors: // value for 'includeVirtualContributors'
* authorizedReadAccessCommunity: // value for 'authorizedReadAccessCommunity'
* },
* });
*/
Expand Down Expand Up @@ -14943,7 +14945,11 @@ export function refetchJourneyCommunityPrivilegesQuery(
}

export const JourneyDataDocument = gql`
query JourneyData($spaceId: UUID!, $includeCommunity: Boolean = false) {
query JourneyData(
$spaceId: UUID!
$includeCommunity: Boolean = false
$authorizedReadAccessCommunity: Boolean = false
) {
lookup {
space(ID: $spaceId) {
id
Expand Down Expand Up @@ -14986,6 +14992,7 @@ export const JourneyDataDocument = gql`
* variables: {
* spaceId: // value for 'spaceId'
* includeCommunity: // value for 'includeCommunity'
* authorizedReadAccessCommunity: // value for 'authorizedReadAccessCommunity'
* },
* });
*/
Expand Down
14 changes: 8 additions & 6 deletions src/core/apollo/generated/graphql-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8835,7 +8835,7 @@ export type RoleDefinitionPolicyFragment = {
export type RoleSetMemberUserFragment = {
__typename?: 'User';
id: string;
isContactable: boolean;
isContactable?: boolean;
email: string;
firstName: string;
lastName: string;
Expand Down Expand Up @@ -8941,6 +8941,7 @@ export type RoleSetRoleAssignmentQueryVariables = Exact<{
includeUsers?: InputMaybe<Scalars['Boolean']>;
includeOrganizations?: InputMaybe<Scalars['Boolean']>;
includeVirtualContributors?: InputMaybe<Scalars['Boolean']>;
authorizedReadAccessCommunity?: InputMaybe<Scalars['Boolean']>;
}>;

export type RoleSetRoleAssignmentQuery = {
Expand All @@ -8957,7 +8958,7 @@ export type RoleSetRoleAssignmentQuery = {
users: Array<{
__typename?: 'User';
id: string;
isContactable: boolean;
isContactable?: boolean;
email: string;
firstName: string;
lastName: string;
Expand Down Expand Up @@ -19590,6 +19591,7 @@ export type JourneyCommunityPrivilegesQuery = {
export type JourneyDataQueryVariables = Exact<{
spaceId: Scalars['UUID'];
includeCommunity?: InputMaybe<Scalars['Boolean']>;
authorizedReadAccessCommunity?: InputMaybe<Scalars['Boolean']>;
}>;

export type JourneyDataQuery = {
Expand Down Expand Up @@ -19631,7 +19633,7 @@ export type JourneyDataQuery = {
leadUsers: Array<{
__typename?: 'User';
id: string;
isContactable: boolean;
isContactable?: boolean;
email: string;
firstName: string;
lastName: string;
Expand Down Expand Up @@ -19803,7 +19805,7 @@ export type JourneyCommunityFragment = {
leadUsers: Array<{
__typename?: 'User';
id: string;
isContactable: boolean;
isContactable?: boolean;
email: string;
firstName: string;
lastName: string;
Expand Down Expand Up @@ -20815,7 +20817,7 @@ export type SpacePageQuery = {
leadUsers: Array<{
__typename?: 'User';
id: string;
isContactable: boolean;
isContactable?: boolean;
email: string;
firstName: string;
lastName: string;
Expand Down Expand Up @@ -21069,7 +21071,7 @@ export type SpacePageFragment = {
leadUsers: Array<{
__typename?: 'User';
id: string;
isContactable: boolean;
isContactable?: boolean;
email: string;
firstName: string;
lastName: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fragment RoleSetMemberUser on User {
id
isContactable
isContactable @skip(if: $authorizedReadAccessCommunity)
profile {
id
displayName
Expand Down
1 change: 1 addition & 0 deletions src/domain/access/graphql/queries/RoleSetDetails.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ query RoleSetRoleAssignment(
$includeUsers: Boolean = true,
$includeOrganizations: Boolean = true,
$includeVirtualContributors: Boolean = true,
$authorizedReadAccessCommunity: Boolean = false
) {
lookup {
roleSet(ID: $roleSetId) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
query JourneyData($spaceId: UUID!, $includeCommunity: Boolean = false) {
query JourneyData($spaceId: UUID!, $includeCommunity: Boolean = false, $authorizedReadAccessCommunity: Boolean = false) {
lookup {
space(ID: $spaceId) {
id
Expand Down

0 comments on commit 09ec9e7

Please sign in to comment.