Views - Anonymous User

Created on 3 April 2023, over 1 year ago
Updated 15 May 2023, over 1 year ago

Problem/Motivation

Currently when we query a view to execute, unless we are logged in as administrator, it does not work since a check is made on the `administer views` permission and it would not be wise to give this permission to anonymous users.

Steps to reproduce

  • Create a graphql server,
  • Check the views extension
  • Create a view with no access restriction
  • Enable the view in the list of enabled views.
  • Go in postman and run the following
query MyQuery {
  entityById(entityType: VIEW, id: "name_of_view_with_no_access_restriction") {
    ... on View {
      id
      executable {
        ... on ViewExecutableContentDefault {
          __typename
          execute(title: "test") {
            rows {
              label
              toArray
            }
          }
        }
      }
    }
  }
}
🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇲🇺Mauritius whiz11

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024