Bugzilla – Attachment 84362 Details for
Bug 22132
Add Basic authentication to the REST API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22132: Add RESTBasicAuth syspref
Bug-22132-Add-RESTBasicAuth-syspref.patch (text/plain), 3.34 KB, created by
Martin Renvoize (ashimema)
on 2019-01-24 16:37:05 UTC
(
hide
)
Description:
Bug 22132: Add RESTBasicAuth syspref
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-01-24 16:37:05 UTC
Size:
3.34 KB
patch
obsolete
>From 64c1b59f6bb49b071dba6523b3c82a3c8716fcc5 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 15 Jan 2019 13:22:53 -0300 >Subject: [PATCH] Bug 22132: Add RESTBasicAuth syspref > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../mysql/atomicupdate/bug_22132_basic_auth.perl | 13 +++++++++++++ > installer/data/mysql/sysprefs.sql | 1 + > .../en/modules/admin/preferences/web_services.pref | 6 ++++++ > 3 files changed, 20 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_22132_basic_auth.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_22132_basic_auth.perl b/installer/data/mysql/atomicupdate/bug_22132_basic_auth.perl >new file mode 100644 >index 0000000000..ae98472abc >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_22132_basic_auth.perl >@@ -0,0 +1,13 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ >+ $dbh->do(q{ >+ INSERT IGNORE INTO systempreferences >+ (variable, value, options, explanation, type ) >+ VALUES >+ ('RESTBasicAuth','0',NULL,'If enabled, Basic authentication is enabled for the REST API.','YesNo') >+ }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 22132 - Add Basic authentication)\n"; >+} >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index e67970aeb8..2150e6d183 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -487,6 +487,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('ReservesControlBranch','PatronLibrary','ItemHomeLibrary|PatronLibrary','Branch checked for members reservations rights','Choice'), > ('ReservesMaxPickUpDelay','7','','Define the Maximum delay to pick up an item on hold','Integer'), > ('ReservesNeedReturns','1','','If ON, a hold placed on an item available in this library must be checked-in, otherwise, a hold on a specific item, that is in the library & available is considered available','YesNo'), >+('RESTBasicAuth','0',NULL,'If enabled, Basic authentication is enabled for the REST API.','YesNo'), > ('RESTdefaultPageSize','20','','Default page size for endpoints listing objects','Integer'), > ('RESTOAuth2ClientCredentials','0',NULL,'If enabled, the OAuth2 client credentials flow is enabled for the REST API.','YesNo'), > ('RestrictedPageLocalIPs','',NULL,'Beginning of IP addresses considered as local (comma separated ex: "127.0.0,127.0.2")','Free'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref >index 898fafa624..9b62e26d66 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref >@@ -1,5 +1,11 @@ > Web services: > REST API: >+ - >+ - pref: RESTBasicAuth >+ choices: >+ yes: Enable >+ no: "Disable" >+ - '<a href="https://www.w3.org/Protocols/HTTP/1.0/spec.html#BasicAA" target="_blank">Basic authentication</a> for the REST API.' > - > - "Set the default number of results returned by the REST API endpoints to" > - pref: "RESTdefaultPageSize" >-- >2.20.1
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 22132
:
83989
|
83990
|
83991
|
83993
|
83994
|
83995
|
84353
|
84354
|
84355
|
84361
|
84362
|
84363
|
84364
|
84365
|
84368
|
84369
|
84371
|
84535
|
84536
|
84537
|
84538
|
84539
|
85024