Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added user endpoint to return if user is authorized to create datasets #391

Merged
merged 2 commits into from
Mar 20, 2023

Conversation

nitrosx
Copy link
Contributor

@nitrosx nitrosx commented Mar 17, 2023

Description

This PR adds a user endpoint to check if the user specified is allowed to create datasets or not.
Users with admin privileges are allowed to check different users.

Motivation

The frontend currently show the "Create Dataset" button in the dataset list page, no matter if the user logged in has the authorization to create the datasets or not.
We want the frontend to show/hide the button according to the user authorization. This endpoint should provide the info needed.

Changes:

  • user controller
  • user service

Tests included/Docs Updated?

  • Included for each change/fix?
  • Passing? (Merge will not be approved unless this is checked)
  • Docs updated?
  • New packages used/requires npm install?
  • Toggle added for new features?

@nitrosx nitrosx merged commit c0ad80e into master Mar 20, 2023
@nitrosx nitrosx deleted the swap-3156 branch March 20, 2023 08:13
Copy link
Collaborator

@martin-trajanovski martin-trajanovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comments but otherwise I find it good

src/casl/guards/policies.guard.ts Show resolved Hide resolved
src/users/users.controller.ts Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants