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

authorization: limit roles management using API #284

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

zannkukai
Copy link
Contributor

@zannkukai zannkukai commented Jun 16, 2020

This commit restricts the role management for patrons using the role
management API. Depending of the API result, some roles could be
disabled into the role field.

Co-authored_by: Renaud Michotte renaud.michotte@gmail.com

Why are you opening this PR?

https://tree.taiga.io/project/rero21-reroils/task/1523?kanban-status=1224894

Dependencies

How to test?

  • Logged as a system_librarian

  • Go into the professional interface and try to edit a patron

  • A system_librarian should be able to manage all roles, no role should be disabled.

  • Logged as a librarian

  • Go into the professional interface and try to edit a patron

  • The system_librarian role should be displayed but disabled.

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?
  • Extracted translations?

@zannkukai zannkukai self-assigned this Jun 16, 2020
@zannkukai zannkukai added this to the v0.10.0 (rero-ils) milestone Jun 16, 2020
@zannkukai zannkukai force-pushed the zan-#1523-librarian-authorizations branch from ae605ec to 1d1f4ac Compare June 16, 2020 15:09
@zannkukai zannkukai marked this pull request as ready for review June 17, 2020 05:59
@zannkukai zannkukai force-pushed the zan-#1523-librarian-authorizations branch 2 times, most recently from a82db7f to 1b8718b Compare June 17, 2020 06:37
@zannkukai zannkukai force-pushed the zan-#1523-librarian-authorizations branch from 1b8718b to a0c990c Compare June 18, 2020 08:14
@zannkukai zannkukai force-pushed the zan-#1523-librarian-authorizations branch 2 times, most recently from b885e19 to 95e45a4 Compare June 24, 2020 14:28
Copy link
Contributor

@iGormilhit iGormilhit left a comment

Choose a reason for hiding this comment

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

Commit message approved.

This commit restricts the role management for patrons using the role
management API. Depending of the API result, some roles could be
disabled into the role field into the Patron form.

If the current user has only the librarian role, then the library field
from the patron form editor will be disabled and set by default to the
current library from the current logged user.

- Closes rero/rero-ils#930

Co-authored_by: Renaud Michotte <renaud.michotte@gmail.com>
@zannkukai zannkukai force-pushed the zan-#1523-librarian-authorizations branch from 95e45a4 to 0a1034c Compare June 25, 2020 08:46
@zannkukai zannkukai merged commit 4161cb5 into rero:dev Jun 25, 2020
@zannkukai zannkukai deleted the zan-#1523-librarian-authorizations branch June 25, 2020 15:43
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.

Librarian permissions are too large on other librarian records
5 participants