Bugzilla – Attachment 145747 Details for
Bug 26628
Clubs permissions should grant access to Tools page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26628: Fix access to clubs when user only has clubs permission
Bug-26628-Fix-access-to-clubs-when-user-only-has-c.patch (text/plain), 3.50 KB, created by
Andrew Fuerste-Henry
on 2023-01-27 14:12:01 UTC
(
hide
)
Description:
Bug 26628: Fix access to clubs when user only has clubs permission
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2023-01-27 14:12:01 UTC
Size:
3.50 KB
patch
obsolete
>From 18d42ef77503cd9eb11d25bea23303c9570df47c Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Thu, 26 Jan 2023 21:46:51 +0000 >Subject: [PATCH] Bug 26628: Fix access to clubs when user only has clubs > permission > >If a user only has the clubs and no permission from the tools section, >they can't access the patron clubs page by navigation. This patch >extends the permission checks for tools to include the clubs, that >live on the tools page, but have a top level permission. > >To test: >- create a patron with only the catalogue and clubs permissions >- log in to the staff client as that patron >- navigate to a patron record, confirm you can see the Clubs tab in the patron account, can add patrons to and remove patrons from clubs >- confirm you don't have a link to the Tools module either on the Koha homepage or in the More menu >- enter the clubs URL manually (/cgi-bin/koha/clubs/clubs.pl), confirm you are allowed to open the page >- Apply patch >- The only changes should be: > - You can now see the Tools entry in the More navigation menu > - You can now see the Tools module link on the start page > - Both take you to the tools page, only visible tools is 'Patron clubs' > >Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/header.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt | 2 +- > tools/tools-home.pl | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >index 9925b7aba4..c22896aa38 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc >@@ -55,7 +55,7 @@ > [% IF ( CAN_user_suggestions_suggestions_manage ) %] > <li><a href="/cgi-bin/koha/suggestion/suggestion.pl">Suggestions</a></li> > [% END %] >- [% IF ( CAN_user_tools ) %] >+ [% IF ( CAN_user_tools || CAN_user_clubs ) %] > <li><a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a></li> > [% END %] > [% IF ( Koha.Preference('EnablePointOfSale') && Koha.Preference('UseCashRegisters') && CAN_user_cash_management_takepayment ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >index 1b96d1a8a5..75f5cfc6de 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -156,7 +156,7 @@ > [% END %] > > >- [% IF ( CAN_user_tools ) %] >+ [% IF ( CAN_user_tools || CAN_user_clubs ) %] > <li> > <a class="icon_general icon_tools" href="/cgi-bin/koha/tools/tools-home.pl"><i class="fa fa-fw fa-wrench"></i>Tools</a> > </li> >diff --git a/tools/tools-home.pl b/tools/tools-home.pl >index 842ae68874..8ae7953842 100755 >--- a/tools/tools-home.pl >+++ b/tools/tools-home.pl >@@ -29,7 +29,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > template_name => "tools/tools-home.tt", > query => $query, > type => "intranet", >- flagsrequired => { tools => '*' }, >+ flagsrequired => [ tools => '*', clubs => '*' ], > } > ); > >-- >2.30.2
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 26628
:
145707
|
145747
|
145850