client-web icon indicating copy to clipboard operation
client-web copied to clipboard

BUG: Regular users can't explore the /spaces page

Open bobbykolev opened this issue 9 months ago • 0 comments

Describe the bug Regular users can access the https://acc-alkem.io/spaces page (except the Global Admins).

To Reproduce

  1. Go to https://acc-alkem.io/spaces (non-GA account)
  2. See the error - FORBIDDEN_POLICY

Expected behavior The spaces and subspaces should be visible.

Screenshots Screenshot 2024-05-02 183711.png

Additional context See the error: "User (...) does not have credentials that grant 'read' access to Space.subspaces"

Query:

  $first: Int!
  $after: UUID
  $visibilities: [SpaceVisibility!] = [ACTIVE]
) {
  spacesPaginated(
    first: $first
    after: $after
    filter: { visibilities: $visibilities }
  ) {
    spaces {
      ...SpaceExplorerSpaceWithChallenges
      __typename
    }
    pageInfo {
      ...PageInfo
      __typename
    }
    __typename
  }
}

fragment SpaceExplorerSpaceWithChallenges on Space {
  ...SpaceExplorerSpace
  subspaces {
    ...SpaceExplorerSubspace
    __typename
  }
  __typename
}

fragment SpaceExplorerSpace on Space {
  id
  authorization {
    id
    anonymousReadAccess
    __typename
  }
  type
  profile {
    id
    url
    tagline
    displayName
    type
    tagset {
      id
      tags
      __typename
    }
    cardBanner: visual(type: CARD) {
      ...VisualUri
      __typename
    }
    __typename
  }
  context {
    id
    vision
    __typename
  }
  account {
    id
    license {
      id
      visibility
      __typename
    }
    __typename
  }
  community {
    id
    myMembershipStatus
    __typename
  }
  __typename
}

fragment VisualUri on Visual {
  id
  uri
  name
  __typename
}

fragment SpaceExplorerSubspace on Space {
  id
  type
  profile {
    id
    url
    tagline
    displayName
    description
    cardBanner2: visual(type: CARD) {
      ...VisualUri
      __typename
    }
    type
    tagset {
      id
      tags
      __typename
    }
    avatar2: visual(type: AVATAR) {
      ...VisualUri
      __typename
    }
    __typename
  }
  context {
    id
    vision
    __typename
  }
  community {
    id
    myMembershipStatus
    __typename
  }
  __typename
}

fragment PageInfo on PageInfo {
  startCursor
  endCursor
  hasNextPage
  __typename
}
{
  "visibilities": [
    "ACTIVE"
  ],
  "first": 10
}```

bobbykolev avatar May 02 '24 15:05 bobbykolev