Skip to content

How to implement access control? #88

@ionizer

Description

@ionizer

Hi there!

I am trying to implement a GraphQL server with Objection.js to handle database queries, and of course this library to build the GraphQL schema. And for security measures, some access control needs to be implemented, as it is undesirable to have let's say a user querying another user's data in Users table. Assuming there are common (normal user privilege) and admin user roles in the table, the access controls should be implemented is as follows:

  1. Unauthenticated users cannot query from the table
  2. Authenticated (common) users can only query their own info
  3. Authenticated (admin) users can query all user info

How can we achieve such access control with this library?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions