Koha/t/db_dependent
Alex Buckley b933a44441 Bug 26346: Add option to make public lists editable by all staff
If a staff member has access to the staff client (either because
'catalogue' permission is enabled or they're a superlibrarian
then that user can add items (from OPAC or staff client) to a list
marked 'Staff only'

Test plan:
1. In the staff client go to: Lists > 'New list'. Notice under 'Allow changes to contents
from' there are three options: Nobody, Owner only, Anyone seeing this
list

2. Apply first 3 patches and run updatedatabase.pl
cd installer/data/mysql
sudo koha-shell <instance>
./updatedatabase.pl

3. Restart memcached and plack

4. Create 4 patron accounts:
- User A : Superlibrarian permissions
- User B : 'Staff access, allows viewing of catalogue in staff interface
(catalogue)'
- User C : No permissions
- User D : 'Staff access, allows viewing of catalogue in staff
interface' and 'Lists' > Edit public lists (edit_public_lists)' sub-permission

5. Login to staff client as User A.
Create a public list and select the new 'Staff only' option under 'Allow changes to contents from'

6. Log into the staff client as User B.
Confirm you can add items to the list from the following staff client pages:
- Individual list page using the 'Add items' button
- Staff client search result page
- Staff client biblio detail page

7. Confirm you can remove items from the list

8. Confirm you can perform an OPAC search when not logged in

9. Log into the OPAC as User B. Confirm you can add items to the list
from the following OPAC pages:
- OPAC search result page
- OPAC biblio detail page

10. Log into the OPAC as User C. Do an OPAC search and confirm you
can view the list, but not add items to it

11. Login to the staff client as User B. Create a new list with the
following settings:
- 'Category'='Private',
- 'Allow changes to contents from'='Staff only'

Notice a red hint message is displayed.
Change 'Category'='Public' and notice the hint is removed

12. Log into the OPAC as User C. Notice the 'Staff only' option is not
available when creating a list

13. Log into the OPAC as User B. Repeat step 11. Confirm the same
outcome

14. Log into the staff client as User A. Create a list with the
following settings:

- Public = 'Public'
- Allow changes to contents from = 'owner only'

15. Log into the staff client as User D. Edit the list from step 14
confirm you can edit the list to have 'Allow changes to contents from' =
'Staff only'

16. Run Patron.t and Virtualshelves.t unit tests:
sudo koha-shell <instance>
prove t/db_dependent/Koha/Patron.t
prove t/db_dependent/Virtualshelves.t

Sponsored-by: Horowhenua District Council, New Zealand

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-12 17:13:02 +02:00
..
Acquisition
api/v1 Bug 29810: Add 'x-koha-embed' to reserved words 2022-04-12 11:40:16 +02:00
Auth
AuthoritiesMarc
Authority
Biblio Bug 24674: (follow-up) Simpler regex 2021-11-05 12:17:08 +01:00
Circulation Bug 30114: Add Unit Tests 2022-04-04 16:23:45 +02:00
CourseReserves
Creators
cronjobs Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
data Bug 13952: (follow-up) Tests 2022-04-04 16:23:45 +02:00
Exporter
Holds Bug 29976: (Bug 21729 follow-up) fix holds unit tests 2022-02-01 21:39:39 -10:00
Illrequest
Items Bug 22827: Add age dependency on other fields than dateaccessioned 2022-04-08 15:49:16 +02:00
Koha Bug 26346: Add option to make public lists editable by all staff 2022-04-12 17:13:02 +02:00
Labels
LDAP
Letters Bug 29759: (follow-up) Fix TemplateToolkit.t 2022-02-02 09:48:33 -10:00
Members
misc/translator
OAI Bug 29484: Regression tests 2021-12-10 21:14:59 -10:00
Patron Bug 30076: Add ability to check patron messaging preferences from a notice 2022-04-08 15:49:16 +02:00
Record
Reports Bug 26669: Last Run if report not always updated 2022-04-04 16:23:46 +02:00
Reserves Bug 29976: (Bug 21729 follow-up) fix holds unit tests 2022-02-01 21:39:39 -10:00
Search Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
selenium Bug 30063: Add selenium tests 2022-04-04 09:47:01 +02:00
Serials
SIP Bug 20517: (follow-up) Add explanation to syspref and fix QA issues 2022-04-08 15:49:17 +02:00
Template/Plugin Bug 29826: Manage call of Template Plugin Branches GetName() with null or empty branchcode 2022-03-03 16:11:50 -10:00
Utils Bug 30063: Remove occurrences of C4::Utils::DataTables::Members 2022-04-04 09:47:01 +02:00
www Bug 29368: Correctly mock Zebra index from tests 2021-10-29 15:45:53 +02:00
00-strict.t Bug 28617: Remove kohalib.pl and rely on PERL5LIB 2021-12-07 12:16:28 -10:00
01-test_dbic.t
Accounts.t
Acquisition.t Bug 29844: Some more uncaught cases 2022-02-09 15:36:23 -10:00
Amazon.t
ArticleRequests.t Bug 29182: (follow-up) Fix ArticleRequests.t 2021-10-07 15:49:01 +02:00
AudioAlerts.t Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
Auth.t Bug 29957: Clear cookies on logout 2022-04-12 11:40:17 +02:00
Auth_with_cas.t
Auth_with_ldap.t
AuthorisedValues.t Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
AuthoritiesMarc.t
AuthUtils.t
BackgroundJob.t
Barcodes.t
Barcodes_ValueBuilder.t Bug 26328: Add test 2022-03-23 10:50:51 -10:00
Biblio.t Bug 29486: Fix tests 2022-03-22 10:17:34 -10:00
Breeding.t Bug 29437: (QA follow-up) Update TODO in Breeding.t 2021-11-19 15:23:27 +01:00
Budgets.t Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
Cache.t
Calendar.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Charset.t
check_kohastructure.t
check_sysprefs.t
Circulation.t Bug 19532: Make recalls.status an ENUM 2022-03-14 22:45:52 -10:00
Clubs.t Bug 29736: (QA follow-up) No need to delete all clubs 2022-01-13 16:37:33 -10:00
Context.t
Contract.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
CourseReserves.t
db_structure.t
DecreaseLoanHighHolds.t Bug 29562: Fix DecreaseLoanHighHolds.t 2022-01-31 21:55:40 -10:00
Filter_MARC_ViewPolicy.t
Fines.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
FrameworkPlugin.t Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
Heading.t
Heading_MARC21.t
Hold.t Bug 21652: Simplify code 2022-01-28 21:52:54 -10:00
Holds.t Bug 19532: (QA follow-up) Fixing unit tests 2022-03-14 22:45:51 -10:00
HoldsQueue.t Bug 29015: Unit tests 2021-11-03 15:40:52 +01:00
Holidays.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Illcomments.t
Illrequestattributes.t
Illrequests.t Bug 28932: Regression tests 2022-01-17 14:55:56 -10:00
ILSDI_Services.t Bug 28238: Add tests 2022-01-28 11:09:07 -10:00
ImportBatch.t Bug 29838: Fix string interpolation in ImportBatch.t 2022-01-21 21:34:51 -10:00
ImportExportFramework.t Bug 13952: (follow-up) Tests 2022-04-04 16:23:45 +02:00
Installer.t Bug 26326: (follow-up) Add ability to check for existence of any primary key 2021-11-03 15:40:52 +01:00
Items.t Bug 17748: (follow-up) Stronger unit tests 2022-03-24 14:22:10 -10:00
Koha.t Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
Koha_Authority.t
Koha_Database.t
Koha_Elasticsearch.t
Koha_ExternalContent_OverDrive.t
Koha_ExternalContent_RecordedBooks.t
Koha_Misc_Files.t
Languages.t
Letters.t
LibraryGroups.t Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
Linker_Default.t
Linker_FirstMatch.t
Log.t Bug 28692: (follow-up) Add tests 2021-11-16 14:00:21 +01:00
MarcModificationTemplates.t
Members.t Bug 28962: Add del-unv-selfreg to crontab 2022-01-21 21:34:51 -10:00
Message.t
MungeMarcPrice.t
Overdues.t Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
Passwordrecovery.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Patroncards.t
PatronLists.t Bug 16446: Add ability to add patrons to list by borrowernumber 2021-10-21 12:24:04 +02:00
Patrons.t Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
Record.t
RecordProcessor_EmbedSeeFromHeadings.t
Reports.t
Reserves.t Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
rollingloans.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
RotatingCollections.t
Search.t Bug 30153: (QA follow-up) Fix unit tests 2022-03-01 22:47:47 -10:00
Serials.t Bug 30035: Fix failing test 2022-03-04 09:33:00 -10:00
Serials_2.t
Service.t
ShelfBrowser.t
Sitemapper.t Bug 28931: Use EXPORT_OK from Koha::DateUtils 2021-10-07 11:01:05 +02:00
Stats.t Bug 19532: Other objects used in recalls feature 2022-03-14 22:45:51 -10:00
StockRotationItems.t Bug 29809: (follow-up) Update tests and rename variable 2022-01-31 21:55:40 -10:00
StockRotationRotas.t
StockRotationStages.t Bug 29809: Fix StockRotationStages.t 2022-01-31 21:55:40 -10:00
SuggestionEngine_ExplodedTerms.t
Suggestions.t Bug 28855: (follow-up) adapt specific test 2021-12-15 12:14:53 -10:00
sysprefs.t
TablesSettings.t
Tags.t
Templates.t Bug 29695: Remove GetColumnDefs 2022-04-12 11:40:16 +02:00
TestBuilder.t Bug 29862: Add missing txn begin/rollback in TestBuilder.t 2022-01-31 21:55:40 -10:00
Upload.t Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
UsageStats.t
Virtualshelves.t Bug 26346: Add option to make public lists editable by all staff 2022-04-12 17:13:02 +02:00
XISBN.t
XSLT.t Bug 29802: Unit tests 2022-03-23 10:50:51 -10:00
yaml.t
zebra_config.pl