Skip to content
This repository was archived by the owner on Jan 28, 2022. It is now read-only.
This repository was archived by the owner on Jan 28, 2022. It is now read-only.

[FEATURE REQUEST] User Role helper #64

@go4cas

Description

@go4cas

The current SDK methods include a helper to get the user data (auth.user()). I would be great if we could get something similar for user roles. At present I can get this by calling auth.getClaim('x-hasura-allowed-roles'), but I think a helper would be more inline with the current design?

My use case: extracting user roles on the front-end to guard navigation routes, and show/hide features based on allowed roles.

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