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: allow read access to holding and items for all users #632

Merged
merged 1 commit into from
Nov 20, 2019

Conversation

BadrAly
Copy link

@BadrAly BadrAly commented Nov 18, 2019

  • Adds possibilities to access loan API for users of same organisation.
  • Restricts patron API loan search to his own loans.
  • Adds organisation to the loan schema.
  • Permits API access to holdings and items for all type of users.
  • Changes Loan route from /circulation/loans to /loans.
  • Sets loan API search sort order to loan transaction_date.

Co-Authored-by: Aly Badr [email protected]

Why are you opening this PR?

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

How to test?

  • scripts/setup
  • login as patron:
    ** list your loans via ~/api/loans or for a specific loan ~/api/loans/<pid>
    ** list all holdings and items of the instance via ~/api/items/ and ~/api/holdings/
  • login as librarian or system_librarian:
    ** list all loans of your organisation via ~/api/loans or for a specific loan ~/api/loans/<pid>
    ** list all holdings and items of the instance via ~/api/items/ and ~/api/holdings/

Code review check list

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

rero_ils/config.py Outdated Show resolved Hide resolved
rero_ils/modules/loans/api.py Outdated Show resolved Hide resolved
rero_ils/modules/loans/permissions.py Outdated Show resolved Hide resolved
@BadrAly BadrAly requested a review from iGormilhit November 19, 2019 09:38
@BadrAly BadrAly force-pushed the item-holdings-loan-api branch from 8ce997f to 7219b7f Compare November 19, 2019 12:31
@BadrAly BadrAly requested a review from zannkukai November 19, 2019 12:32
rero_ils/permissions.py Show resolved Hide resolved
* Adds possibilities to access loan API for users of same organisation.
* Restricts patron API loan search to his own loans.
* Adds organisation to the loan schema.
* Permits API access to holdings and items for all type of users.
* Changes Loan route from /circulation/loans to /loans.
* Sets loan API search sort order to loan transaction_date.

Co-Authored-by: Aly Badr <[email protected]>
@BadrAly BadrAly force-pushed the item-holdings-loan-api branch from 7219b7f to 1def5a9 Compare November 20, 2019 08:03
@jma jma merged commit 5a88831 into rero:dev Nov 20, 2019
@BadrAly BadrAly deleted the item-holdings-loan-api branch January 27, 2020 10:57
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.

5 participants