Bugzilla – Attachment 172408 Details for
Bug 38094
Librarians with only fast add permission can no longer edit existing fast add records
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38094: Regression tests
Bug-38094-Regression-tests.patch (text/plain), 1.79 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-10-04 14:44:13 UTC
(
hide
)
Description:
Bug 38094: Regression tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-10-04 14:44:13 UTC
Size:
1.79 KB
patch
obsolete
>From f1481e9ef9e61dfe258f304a7ec5a965369fd48d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 4 Oct 2024 11:27:50 -0300 >Subject: [PATCH] Bug 38094: Regression tests > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Koha/Biblio.t | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t >index 6af083b2762..25abfec30f9 100755 >--- a/t/db_dependent/Koha/Biblio.t >+++ b/t/db_dependent/Koha/Biblio.t >@@ -1744,7 +1744,7 @@ subtest 'opac_summary_html' => sub { > > subtest 'can_be_edited() tests' => sub { > >- plan tests => 6; >+ plan tests => 8; > > $schema->storage->txn_begin; > >@@ -1772,6 +1772,24 @@ subtest 'can_be_edited() tests' => sub { > > ok( $biblio->can_be_edited($patron), "Patron with 'edit_catalogue' can edit" ); > >+ my $fa_biblio = $builder->build_sample_biblio( { frameworkcode => 'FA' } ); >+ my $fa_patron = $builder->build_object( { class => 'Koha::Patrons', value => { flags => 0 } } ); >+ >+ # Add editcatalogue => edit_catalog subpermission >+ $builder->build( >+ { >+ source => 'UserPermission', >+ value => { >+ borrowernumber => $fa_patron->id, >+ module_bit => 9, # editcatalogue >+ code => 'fast_cataloging', >+ }, >+ } >+ ); >+ >+ ok( !$biblio->can_be_edited($fa_patron), "Fast add permissions are not enough" ); >+ ok( $fa_biblio->can_be_edited($fa_patron), "Fast add user can edit FA records" ); >+ > # Mock the record source doesn't allow direct editing > $source_allows_editing = 0; > ok( !$biblio->can_be_edited($patron), "Patron needs 'edit_locked_record' subpermission for locked records" ); >-- >2.46.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 38094
:
172402
|
172403
|
172404
|
172405
|
172406
|
172407
| 172408 |
172409
|
172410