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

permissions: disable edit and delete buttons for librarians #566

Merged
merged 1 commit into from
Oct 23, 2019

Conversation

BadrAly
Copy link

@BadrAly BadrAly commented Oct 16, 2019

Co-Authored-by: Aly Badr aly.badr@rero.ch

How to test?

  • bootstrap
  • login as a librarian and make sure you can only edit your library and its locations
  • you should not be able to edit or delete library(locations) of other libraries
  • re-login as system_librarian and make sure you can edit, delete any library or location of your organisation.

Code review check list

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

@BadrAly BadrAly added the WIP label Oct 16, 2019
@BadrAly BadrAly force-pushed the baa-#1076-fix-issue-488 branch from 4b18aab to 9ec94f6 Compare October 16, 2019 13:55
@BadrAly BadrAly changed the title permissions: disable edit and delete buttons for libraririans permissions: disable edit and delete buttons for librarians Oct 16, 2019
@BadrAly BadrAly force-pushed the baa-#1076-fix-issue-488 branch 5 times, most recently from e804cd3 to b16680a Compare October 17, 2019 06:50
@BadrAly BadrAly removed the WIP label Oct 17, 2019
@BadrAly BadrAly requested review from a team and removed request for lauren-d October 17, 2019 12:40
rero_ils/modules/locations/permissions.py Show resolved Hide resolved
rero_ils/permissions.py Outdated Show resolved Hide resolved
tests/api/test_libraries_rest.py Show resolved Hide resolved
Copy link
Contributor

@lauren-d lauren-d left a comment

Choose a reason for hiding this comment

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

As librarian, I can access directly (by url) to the edit form of another library. Is it possible to protect that?
note: the save action doesn't work as expected

@BadrAly BadrAly force-pushed the baa-#1076-fix-issue-488 branch 3 times, most recently from 2caaa0a to 4cd1f3d Compare October 21, 2019 09:31
@BadrAly
Copy link
Author

BadrAly commented Oct 21, 2019

As librarian, I can access directly (by url) to the edit form of another library. Is it possible to protect that?
note: the save action doesn't work as expected

As per @jma, I am opening an issue for this. it is a bug in the rero-ils-ui custom-editor.

@BadrAly BadrAly requested review from lauren-d and jma October 21, 2019 09:45
@BadrAly BadrAly requested a review from a team October 22, 2019 06:43
@pronguen pronguen self-requested a review October 22, 2019 10:01
@pronguen pronguen requested a review from rerowyj October 22, 2019 10:07
@rerodak rerodak self-requested a review October 22, 2019 14:21
* Creates separate permission files for patron, library, location resources.
* Disables location/library edit and delete buttons for librarians from external libraries.
* Creates complete units tests for library and location permissions.
* Removes duplicates imports.
* Closes rero#488

Co-Authored-by: Aly Badr <aly.badr@rero.ch>
@BadrAly BadrAly force-pushed the baa-#1076-fix-issue-488 branch from 4cd1f3d to b3b69e8 Compare October 23, 2019 12:39
@BadrAly BadrAly merged commit bad0367 into rero:dev Oct 23, 2019
@BadrAly BadrAly deleted the baa-#1076-fix-issue-488 branch August 24, 2020 07:13
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.

6 participants