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

Fix permission related to mod-patron #1604

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ Feature: edge-patron integration tests
| 'owners.item.post' |
| 'overdue-fines-policies.item.post' |
| 'users.collection.get' |
| 'patron.account.item.post' |
| 'usergroups.collection.get' |
| 'addresstypes.collection.get' |
| 'addresstypes.item.post' |
| 'patron.account.collection.get' |
| 'patron.account.item.get' |
| 'patron.account.item.put' |
| 'patron.account-by-email.item.put' |


* def testTenant = 'ttttpatron'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ Feature: mod-circulation integration tests
| name |
| 'accounts.collection.get' |
| 'accounts.item.put' |
| 'accounts.check-pay.post' |
| 'accounts.pay.post' |
| 'feesfines.accounts.check-pay.item.post' |
| 'feesfines.accounts-bulk.check-pay.item.post' |
| 'feesfines.accounts.pay.item.post' |
| 'feesfines.accounts-bulk.pay.item.post' |
| 'automated-patron-blocks.collection.get' |
| 'automated-patron-blocks.collection.get' |
| 'check-in-storage.check-ins.collection.get' |
Expand All @@ -50,7 +52,8 @@ Feature: mod-circulation integration tests
| 'circulation.requests.hold-shelf-clearance-report.get' |
| 'circulation.requests.item.get' |
| 'circulation.requests.item.post' |
| 'circulation.requests.queue.reorder.collection.post' |
| 'circulation.requests.queue.item-reorder.collection.post' |
| 'circulation.requests.queue.instance-reorder.collection.post' |
| 'circulation.requests.item.delete' |
| 'configuration.entries.collection.get' |
| 'configuration.entries.item.post' |
Expand Down Expand Up @@ -110,7 +113,8 @@ Feature: mod-circulation integration tests
| 'users.item.post' |
| 'users.item.get' |
| 'user-summary.item.get' |
| 'circulation.requests.queue.collection.get' |
| 'circulation.requests.queue-item.collection.get' |
| 'circulation.requests.queue-instance.collection.get' |
| 'okapi.proxy.self.timers.patch' |
| 'circulation.rules.loan-policy.get' |
| 'circulation.rules.overdue-fine-policy.get' |
Expand All @@ -124,7 +128,7 @@ Feature: mod-circulation integration tests
| 'calendar.delete' |
| 'circulation-storage.fixed-due-date-schedules.item.post' |
| 'circulation-storage.loan-policies.item.get' |
| 'mod-settings.global.write.mod-circulation' |
| 'settings.global.write.circulation.execute' |
| 'mod-settings.entries.item.post' |
| 'circulation.settings.item.post' |
| 'circulation.settings.item.delete' |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,20 @@ Feature: mod-feesfines integration tests
| 'accounts.item.put' |
| 'accounts.item.delete' |
| 'accounts.collection.get' |
| 'accounts.pay.post' |
| 'accounts.waive.post' |
| 'accounts.cancel.post' |
| 'accounts.refund.post' |
| 'accounts.transfer.post' |
| 'accounts.check-pay.post' |
| 'accounts.check-waive.post' |
| 'feesfines.accounts.pay.item.post' |
| 'feesfines.accounts-bulk.pay.item.post' |
| 'feesfines.accounts.waive.item.post' |
| 'feesfines.accounts-bulk.waive.item.post' |
| 'feesfines.accounts.cancel.item.post' |
| 'feesfines.accounts-bulk.cancel.item.post' |
| 'feesfines.accounts.refund.item.post' |
| 'feesfines.accounts-bulk.refund.item.post' |
| 'feesfines.accounts.transfer.item.post' |
| 'feesfines.accounts-bulk.transfer.item.post' |
| 'feesfines.accounts.check-pay.item.post' |
| 'feesfines.accounts-bulk.check-pay.item.post' |
| 'feesfines.accounts-bulk.check-waive.item.post' |
| 'feesfines.accounts.check-waive.item.post' |
| 'accounts.check-transfer.post' |
| 'accounts.check-refund.post' |
| 'actual-cost-fee-fine-cancel.post' |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Feature: Automated patron blocks
And request checkOutRequest
When method POST
Then status 422
And match response.errors contains {"message": "Maximum number of overdue items has been reached!", "parameters": [], "code": "USER_IS_BLOCKED_AUTOMATICALLY", "overridableBlock": {"name": "patronBlock","missingPermissions": ["circulation.override-patron-block"]}}
And match response.errors contains {"message": "Maximum number of overdue items has been reached!", "parameters": [], "code": "USER_IS_BLOCKED_AUTOMATICALLY", "overridableBlock": {"name": "patronBlock","missingPermissions": ["circulation.override-patron-block.post"]}}

Scenario: Renewing block exists when 'Max number of overdue items' limit is reached
* def itemBarcode = uuid()
Expand Down Expand Up @@ -261,7 +261,7 @@ Feature: Automated patron blocks
And request renewRequest
When method POST
Then status 422
And match response.errors contains {"message": "Maximum number of overdue items has been reached!", "parameters": [], "code": "USER_IS_BLOCKED_AUTOMATICALLY", "overridableBlock": {"name": "patronBlock","missingPermissions": ["circulation.override-patron-block"]}}
And match response.errors contains {"message": "Maximum number of overdue items has been reached!", "parameters": [], "code": "USER_IS_BLOCKED_AUTOMATICALLY", "overridableBlock": {"name": "patronBlock","missingPermissions": ["circulation.override-patron-block.post"]}}

Scenario: Requesting block exists when 'Max number of overdue items' limit is reached
* def maxNumberOfOverdueItems = 3
Expand Down