Jonathan Druart
a82772d7ec
This patch suggests to add a new flag do_not_print to C4::Auth::checkauth to not print the headers and allow to test this subroutine more easily. We do no longer need to mock safe_exit and redirect STDOUT to test its return values. There are still 3 left: 1. 733 # checkauth will redirect and safe_exit if not authenticated and not authorized => Better to keep this one, not trivial to replace 2. 806 # This will fail on permissions This should be replaced but testing $template->{VARS}->{nopermission} fails, I dont' think the comment is better. 3. 828 # Patron does not have the borrowers permission Same as 2. 2. and 3. should be investigated a bit more. This patch also move duplicated code to set patron's password to a subroutine set_weak_password. Test plan: Read the code and confirm that everything makes sense. QA: Do you have a better way for this? Yes it's dirty! Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
||
---|---|---|
.. | ||
Acquisition | ||
api/v1 | ||
Auth | ||
AuthoritiesMarc | ||
Authority | ||
Biblio | ||
Budgets | ||
Circulation | ||
CourseReserves | ||
Creators | ||
cronjobs | ||
data | ||
Exporter | ||
Holds | ||
Illrequest | ||
Items | ||
Koha | ||
Labels | ||
LDAP | ||
Letters | ||
Members | ||
misc/translator | ||
OAI | ||
Patron | ||
Record | ||
Reports | ||
Reserves | ||
Search | ||
selenium | ||
Serials | ||
SIP | ||
Template/Plugin | ||
Utils | ||
www | ||
00-strict.t | ||
Accounts.t | ||
Acquisition.t | ||
Amazon.t | ||
ArticleRequests.t | ||
AudioAlerts.t | ||
Auth.t | ||
Auth_with_cas.t | ||
Auth_with_ldap.t | ||
Auth_with_shibboleth.t | ||
AuthorisedValues.t | ||
AuthoritiesMarc.t | ||
AuthoritiesMarc_GetTagsLabels.t | ||
AuthUtils.t | ||
Barcodes.t | ||
Barcodes_ValueBuilder.t | ||
Biblio.t | ||
Biblio_holdsqueue.t | ||
Breeding.t | ||
Breeding_Auth.t | ||
Budgets.t | ||
Cache.t | ||
Calendar.t | ||
Charset.t | ||
check_kohastructure.t | ||
check_sysprefs.t | ||
Circulation.t | ||
Circulation_holdsqueue.t | ||
Clubs.t | ||
Context.t | ||
Contract.t | ||
CourseReserves.t | ||
db_structure.t | ||
DecreaseLoanHighHolds.t | ||
Filter_MARC_ViewPolicy.t | ||
Fines.t | ||
FrameworkPlugin.t | ||
Heading.t | ||
Heading_MARC21.t | ||
Hold.t | ||
Holds.t | ||
HoldsQueue.t | ||
Holidays.t | ||
Illbatches.t | ||
IllbatchStatuses.t | ||
Illcomments.t | ||
Illrequestattributes.t | ||
Illrequests.t | ||
ILSDI_Services.t | ||
ImportBatch.t | ||
ImportExportFramework.t | ||
Installer.t | ||
Items.t | ||
Koha.t | ||
Koha_Database.t | ||
Koha_Elasticsearch.t | ||
Koha_ExternalContent_OverDrive.t | ||
Koha_MetadataRecord_Authority.t | ||
Koha_Misc_Files.t | ||
Languages.t | ||
Letters.t | ||
LibraryGroups.t | ||
Linker_Default.t | ||
Linker_FirstMatch.t | ||
Log.t | ||
MarcModificationTemplates.t | ||
Matcher.t | ||
Members.t | ||
Message.t | ||
MungeMarcPrice.t | ||
Overdues.t | ||
Passwordrecovery.t | ||
Patroncards.t | ||
PatronLists.t | ||
Patrons.t | ||
Prices.t | ||
Record.t | ||
RecordProcessor_EmbedSeeFromHeadings.t | ||
Reports.t | ||
Reserves.t | ||
rollingloans.t | ||
RotatingCollections.t | ||
Search.t | ||
Serials.t | ||
Serials_2.t | ||
Service.t | ||
ShelfBrowser.t | ||
Sitemapper.t | ||
SocialData.t | ||
StockRotationItems.t | ||
StockRotationRotas.t | ||
StockRotationStages.t | ||
SuggestionEngine_ExplodedTerms.t | ||
Suggestions.t | ||
sysprefs.t | ||
TablesSettings.t | ||
Tags.t | ||
Templates.t | ||
TestBuilder.t | ||
Upload.t | ||
UsageStats.t | ||
Virtualshelves.t | ||
XISBN.t | ||
XSLT.t | ||
yaml.t | ||
zebra_config.pl |