Bugzilla – Attachment 75206 Details for
Bug 20624
Disable the OAuth2 client credentials grant by default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20624: Add an entry in About when deps are not present
Bug-20624-Add-an-entry-in-About-when-deps-are-not-.patch (text/plain), 4.97 KB, created by
Tomás Cohen Arazi
on 2018-05-09 14:32:13 UTC
(
hide
)
Description:
Bug 20624: Add an entry in About when deps are not present
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2018-05-09 14:32:13 UTC
Size:
4.97 KB
patch
obsolete
>From 8e0e559894fee0dc4f94081c6796084f20ba34ec Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 9 May 2018 11:31:34 -0300 >Subject: [PATCH] Bug 20624: Add an entry in About when deps are not present > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > about.pl | 8 ++++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 9 +++++++-- > .../prog/en/modules/admin/preferences/web_services.pref | 2 +- > 3 files changed, 16 insertions(+), 3 deletions(-) > >diff --git a/about.pl b/about.pl >index 3997d4992a..b3cad66325 100755 >--- a/about.pl >+++ b/about.pl >@@ -26,6 +26,7 @@ use CGI qw ( -utf8 ); > use DateTime::TimeZone; > use List::MoreUtils qw/ any /; > use LWP::Simple; >+use Module::Load::Conditional qw(can_load); > use XML::Simple; > use Config; > use Search::Elasticsearch; >@@ -391,6 +392,13 @@ if ( C4::Context->preference('SearchEngine') eq 'Elasticsearch' ) { > } > } > >+if ( C4::Context->preference('RESTOAuth2ClientCredentials') ) { >+ # Do we have the required deps? >+ unless ( can_load( modules => { 'Net::OAuth2::AuthorizationServer' => undef }) ) { >+ $template->param( oauth2_missing_deps => 1 ); >+ } >+} >+ > # Sco Patron should not contain any other perms than circulate => self_checkout > if ( C4::Context->preference('WebBasedSelfCheck') > and C4::Context->preference('AutoSelfCheckAllowed') >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index c35a01ef87..abcd8c3587 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -183,7 +183,7 @@ > </div> > > <div id="sysinfo"> >- [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues %] >+ [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps %] > [% IF (warnIsRootUser) %] > <h2>Warning regarding current user</h2> > <p>You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account.</p> >@@ -228,7 +228,7 @@ > <br/> > [% END %] > >- [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration %] >+ [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatron || warnPrefAnonymousPatron_PatronDoesNotExist || warnNoActiveCurrency || QueryParserError || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps %] > <h2>Warnings regarding the system configuration</h2> > <table> > <caption>Preferences and parameters</caption> >@@ -295,6 +295,11 @@ > </td></tr> > [% END %] > [% END %] >+ [% IF oauth2_missing_deps %] >+ <tr><th scope="row"><b>Warning</b> </th><td> >+ System preference 'RESTOAuth2ClientCredentials' is set, but the required Net::OAuth2::AuthorizationServer dependency is missing. The feature is disabled. >+ </td></tr> >+ [% END %] > </table> > [% END %] > >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 d9ad25fb52..6b415f212c 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 >@@ -10,7 +10,7 @@ Web services: > choices: > yes: Enable > no: "Disable" >- - "the OAuth2 client credentials grant for the REST API." >+ - "the OAuth2 client credentials grant for the REST API. Requires Net::OAuth2::AuthorizationServer installed. [EXPERIMENTAL]" > OAI-PMH: > - > - pref: OAI-PMH >-- >2.17.0
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 20624
:
74986
|
74987
|
74988
|
74989
|
75020
|
75021
|
75060
|
75061
|
75062
|
75063
|
75064
|
75065
|
75132
|
75184
|
75206