Bugzilla – Attachment 150372 Details for
Bug 31795
Add POST endpoint for Authorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31795: Fix required permissions
Bug-31795-Fix-required-permissions.patch (text/plain), 1.93 KB, created by
Nick Clemens (kidclamp)
on 2023-04-28 13:12:37 UTC
(
hide
)
Description:
Bug 31795: Fix required permissions
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-04-28 13:12:37 UTC
Size:
1.93 KB
patch
obsolete
>From 2bdf3dd193c077ea7e60f1e3c73088c9d8efffaa Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 10 Apr 2023 14:54:30 -0300 >Subject: [PATCH] Bug 31795: Fix required permissions > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > api/v1/swagger/paths/authorities.yaml | 2 +- > t/db_dependent/api/v1/authorities.t | 11 +---------- > 2 files changed, 2 insertions(+), 11 deletions(-) > >diff --git a/api/v1/swagger/paths/authorities.yaml b/api/v1/swagger/paths/authorities.yaml >index e733cf764e..45a18cc217 100644 >--- a/api/v1/swagger/paths/authorities.yaml >+++ b/api/v1/swagger/paths/authorities.yaml >@@ -73,7 +73,7 @@ > $ref: "../swagger.yaml#/definitions/error" > x-koha-authorization: > permissions: >- editcatalogue: edit_catalogue >+ editauthorities: "1" > "/authorities/{authority_id}": > get: > x-mojo-to: Authorities#get >diff --git a/t/db_dependent/api/v1/authorities.t b/t/db_dependent/api/v1/authorities.t >index 1ead19fc8d..3da737e9ad 100755 >--- a/t/db_dependent/api/v1/authorities.t >+++ b/t/db_dependent/api/v1/authorities.t >@@ -189,16 +189,7 @@ subtest 'post() tests' => sub { > ->status_is(403, 'Not enough permissions makes it return the right code'); > > # Add permissions >- $builder->build( >- { >- source => 'UserPermission', >- value => { >- borrowernumber => $patron->borrowernumber, >- module_bit => 9, >- code => 'edit_catalogue' >- } >- } >- ); >+ $patron->flags( 2 ** 14 )->store; # 14 => editauthorities userflag > > # x-koha-override passed to make sure it goes through > $t->post_ok("//$userid:$password@/api/v1/authorities" => {'Content-Type' => 'application/marcxml+xml', 'x-authority-type' => 'CORPO_NAME', 'x-koha-override' => 'any' } => $marcxml) >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31795
:
144555
|
144746
|
144747
|
144749
|
144750
|
149380
|
149407
|
149409
|
149451
|
149459
|
149460
|
149461
|
149462
|
150370
|
150371
| 150372 |
150373