Bugzilla – Attachment 182547 Details for
Bug 39927
Add permissions check to PatronSelfRegistrationAlert on home page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39927: Add permissions check to PatronSelfRegistrationAlert on home page
Bug-39927-Add-permissions-check-to-PatronSelfRegis.patch (text/plain), 4.78 KB, created by
Owen Leonard
on 2025-05-16 17:11:26 UTC
(
hide
)
Description:
Bug 39927: Add permissions check to PatronSelfRegistrationAlert on home page
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2025-05-16 17:11:26 UTC
Size:
4.78 KB
patch
obsolete
>From 8f1d3bd63bdb04cfe932162ce73cd870b84342d5 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 16 May 2025 17:02:42 +0000 >Subject: [PATCH] Bug 39927: Add permissions check to > PatronSelfRegistrationAlert on home page > >This patch adds a permissions check around the display of >PatronSelfRegistrationAlert information on the staff interface home >page. > >To test, apply the patch and follow the test plan on Bug 35028: > >1. Create patron category SELFREG >2. Enable PatronSelfRegistration and set > PatronSelfRegistrationDefaultCategory to SELFREG and > PatronSelfRegistrationAlert to "Show" >3. Go to OPAC, logout if needed, and create a new account. Remember the > value you set for home library. >4. Go to staff interface, set the current library to the one you set in > step 3. > >Now view the staff interface home page as two different users: >- A user with either CAN_user_borrowers_edit_borrowers or > CAN_user_borrowers_list_borrowers permission. >- A user with neither. >- The self-registration information should display or not depending on > the user's permission. > >Sponsored-by: Athens County Public Libraries >--- > .../prog/en/modules/intranet-main.tt | 34 ++++++++++--------- > 1 file changed, 18 insertions(+), 16 deletions(-) > >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 91172dac2af..e1f69f100d6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt >@@ -275,24 +275,26 @@ > </div> > [% END %] > >- [% IF self_registered_count %] >- <div class="pending-info" id="self_registered_patrons_info"> >- Self-registrations from: >- <a >- class="self-registration-link pending-number-link self-registration-link-all" >- href="/cgi-bin/koha/members/member.pl?categorycode_filter=[% Koha.Preference('PatronSelfRegistrationDefaultCategory') | html %]" >- >All libraries: [% self_registered_count | html %]</a >- > >- >- [% IF self_registered_mybranch_count %] >- <span>/</span> >+ [% IF (CAN_user_borrowers_edit_borrowers) || (CAN_user_borrowers_list_borrowers) %] >+ [% IF self_registered_count %] >+ <div class="pending-info" id="self_registered_patrons_info"> >+ Self-registrations from: > <a >- class="self-registration-link pending-number-link self-registration-link-branch" >- href="/cgi-bin/koha/members/member.pl?categorycode_filter=[% Koha.Preference('PatronSelfRegistrationDefaultCategory') | html %]&branchcode_filter=[% Branches.GetLoggedInBranchcode | html %]" >- >[% Branches.GetLoggedInBranchname | html %]: [% self_registered_mybranch_count | html %]</a >+ class="self-registration-link pending-number-link self-registration-link-all" >+ href="/cgi-bin/koha/members/member.pl?categorycode_filter=[% Koha.Preference('PatronSelfRegistrationDefaultCategory') | html %]" >+ >All libraries: [% self_registered_count | html %]</a > > >- [% END %] >- </div> >+ >+ [% IF self_registered_mybranch_count %] >+ <span>/</span> >+ <a >+ class="self-registration-link pending-number-link self-registration-link-branch" >+ href="/cgi-bin/koha/members/member.pl?categorycode_filter=[% Koha.Preference('PatronSelfRegistrationDefaultCategory') | html %]&branchcode_filter=[% Branches.GetLoggedInBranchcode | html %]" >+ >[% Branches.GetLoggedInBranchname | html %]: [% self_registered_mybranch_count | html %]</a >+ > >+ [% END %] >+ </div> >+ [% END %] > [% END %] > </div> > [% END %] >-- >2.39.5
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 39927
:
182547
|
182799
|
182882
|
182883