08e594f149
Before this patch, the C4::Budgets::CanUserUseBudget assumed that budget_owner_id was set if a restriction (budget_permission) exists. see && $budget->{budget_owner_id} && $budget->{budget_owner_id} != $borrower->{borrowernumber} Actually a restriction could exists on users and/or library without being forced to define an owner. Test plan: Create a fund A without restriction Create a fund B restricted to an owner Create a fund C restricted to a non defined owner Create a fund D restricted to owner and users (try defining/no defining an owner and/or users) Create a fund E restricted to owner, users and library (try defining/no defined an owner and/or users) With different logged in users, try to show/edit these differents funds. The restriction should be correctly applied. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tested various permission combinatons, visibility of funds is now ok. - not superlibrarian, no buget_manage_all, no owner, no users, no library, no restrictions on the fund = visible - changed: library = staff patron library, restriction = Owner, users and library = visible - changed: library = not staff patron library = invisible - changed: budget_manage_all = visible - changed: owner = staff patron no budget_manage_all = visible - changed: no owner, user = staff patron = visible - changed: no user, owner = another user, restriction = owner = invisible - changed: budget_manage_all = visible - changed: no budget_manage_all but superlibrarian = visible ... Passes tests and QA script, also t/Budgets/* Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com> |
||
---|---|---|
.. | ||
Acquisition | ||
Budgets | ||
Circulation | ||
db_dependent | ||
Koha/Plugin | ||
lib | ||
Members | ||
searchengine | ||
Serials | ||
00-checkdatabase-version.t | ||
00-deprecated.t | ||
00-load.t | ||
00-merge-conflict-markers.t | ||
00-testcritic.t | ||
00-valid-xml.t | ||
AuthoritiesMarc_MARC21.t | ||
AuthoritiesMarc_UNIMARC.t | ||
AuthUtils.t | ||
Barcodes_annual.t | ||
Barcodes_EAN13.t | ||
Barcodes_hbyymmincr.t | ||
Barcodes_incremental.t | ||
Barcodes_ValueBuilder.t | ||
Biblio.t | ||
Bookseller.t | ||
Boolean.t | ||
Branch.t | ||
Breeding.t | ||
Budgets.t | ||
Cache.t | ||
Calendar.t | ||
Charset.t | ||
Circulation_barcodedecode.t | ||
ClassSortRoutine.t | ||
ClassSortRoutine_Dewey.t | ||
ClassSortRoutine_Generic.t | ||
ClassSortRoutine_LCC.t | ||
ClassSource.t | ||
Context.t | ||
Contract.t | ||
Creators.t | ||
Dates.t | ||
DateUtils.t | ||
Debug.t | ||
dummy.t | ||
External_Overdrive.t | ||
External_Syndetics.t | ||
Form_MessagingPreferences.t | ||
Heading.t | ||
Images.t | ||
ImportBatch.t | ||
Input.t | ||
Installer_PerlDependencies.t | ||
Installer_PerlModules.t | ||
Installer_pm.t | ||
ItemCirculationAlertPreference.t | ||
ItemType.t | ||
Koha.t | ||
Koha_MetadataRecord.t | ||
Koha_Template_Plugin_Cache.t | ||
Koha_Util_MARC.t | ||
Labels.t | ||
Labels_split_ccn.t | ||
Labels_split_ddcn.t | ||
Labels_split_lccn.t | ||
Letters.t | ||
Log.t | ||
Maintainance.t | ||
Matcher.t | ||
Members_Attributes.t | ||
Members_AttributeTypes.t | ||
Members_Messaging.t | ||
Message.t | ||
Output.t | ||
Output_JSONStream.t | ||
Overdues.t | ||
Patroncards.t | ||
Patroncards_Batch.t | ||
Patroncards_Layout.t | ||
Patroncards_Lib.t | ||
Patroncards_Patroncard.t | ||
Patroncards_Profile.t | ||
Patroncards_Template.t | ||
perlcriticrc | ||
Print.t | ||
QueryParser.t | ||
RecordProcessor.t | ||
Review.t | ||
Ris.t | ||
RotatingCollections.t | ||
Scheduler.t | ||
Scrubber.t | ||
Search_PazPar2.t | ||
SimpleMARC.t | ||
SIP_Sip.t | ||
smolder_smoke_signal | ||
SMS.t | ||
SocialData.t | ||
Stats.t | ||
SuggestionEngine.t | ||
SuggestionEngine_AuthorityFile.t | ||
Templates.t | ||
TmplToken.t | ||
VirtualShelves_Merge.t | ||
XSLT.t |