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

IssueID #629 - Fix to allow API Access tab visible on the users's "Edit #3047

Merged
merged 3 commits into from
Oct 25, 2021

Conversation

johnpinto1
Copy link
Contributor

@johnpinto1 johnpinto1 commented Oct 6, 2021

Fix for DCC bug https://github.com/DigitalCurationCentre/DMPonline-Service/issues/629

Fix for "Granting API use rights does not work if other Org Admin privileges not set."

Changes:
- Replaced @user.can_org_admin? (in tests for display of API Access tab
and content) with @user.can_use_api?. This insures that tabs visible in
case it was failing.

@briri & @raycarrick-ed Updated code based on comment #3047 (comment) . The Admin menu is now only visible when @user.can_org_admin? condition is satisfied, which will not be the case if the user is only granted API access.

@johnpinto1
Copy link
Contributor Author

Rubocop errors don't seem related to my changes.

@briri
Copy link
Contributor

briri commented Oct 11, 2021

I would think that a user who only has can_use_api access should NOT be able to see those other Admin menu items.

Yes, the rubocop errors are unrelated to your changes. We are in the process of upgrading to the latest version.

other Org Admin privileges not set."

Changes:
- Replaced @user.can_org_admin? (in tests for display of API Access tab
and content) with @user.can_use_api?. This insures that tabs visible in
case it was failing.
@johnpinto1 johnpinto1 force-pushed the bug_629_granting_API_use_rights_not_working branch from c98f3d0 to 2b481a1 Compare October 13, 2021 11:01
@briri
Copy link
Contributor

briri commented Oct 25, 2021

rubocop failures are a known issue that we're working on in another branch

@briri briri merged commit 69f085c into development Oct 25, 2021
@briri briri deleted the bug_629_granting_API_use_rights_not_working branch October 25, 2021 15:26
nicolasfranck added a commit to DMPbelgium/roadmap that referenced this pull request Jan 12, 2022
nicolasfranck added a commit to DMPbelgium/roadmap that referenced this pull request Feb 28, 2022
nicolasfranck added a commit to DMPbelgium/roadmap that referenced this pull request Jun 1, 2023
nicolasfranck added a commit to DMPbelgium/roadmap that referenced this pull request Jun 1, 2023
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.

3 participants