hasura / hasura/graphql-engine
MSSQL Permissions `allow_aggregations`
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Both:
v2.0.10-cloud.1
v2.0.7
Server Version:
CLI Version (for CLI related issue):
2.0.9
### Environment
Cloud + Docker
### What is the expected behaviour?
MSSQL-Database should support aggregation queries with non-admin authentication
### Keywords
aggregation permissions mssql
https://hasura.io/docs/latest/graphql/core/auth/authorization/permission-rules.html#aggregation-queries-permissions
### What is the current behaviour?
- `allow_aggregations: true` seem to be ignored
- there is no Aggregation Permission Accordion-Tab in the Console Permission UI
- aggregation queries are not in introspection (non-admin authenticated)
- aggregation queries are not found in root when executing (non-admin authenticated)
### How to reproduce the issue?
1. connect mssql, setup a table, track etc.
2. allow permissions for role "test" all rows all columns and `allow_aggregations: true`
3. no aggregations allowed
### Screenshots or Screencast

### Please provide any traces or logs that could help here.
`field \"XXX_aggregate\" not found in type: 'YYY'`
### Any possible solutions?
- Alternative 1: Allow Aggregations in MSSQL for non-admin users
- Alternative 2: (maybe just allow them for everyone who as access to the default query, maybe with a ENV var?)
- Alternative 3: document missing feature
### Can you identify the location in the source code where the problem exists?
no
### If the bug is confirmed, would you be willing to submit a PR?
unfortunately currently not
Contributor guide
Research direction
No source file or test is named. Start by tracing MSSQL permission handling for `allow_aggregations`, then inspect the Console Permission UI and the GraphQL introspection and root-field behavior described in the report. Done means non-admin roles with aggregation permission can discover and execute aggregation queries, with the documented reproduction covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- api, authorization, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100