Bugzilla – Attachment 173703 Details for
Bug 37392
Edit item permission by library group is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37392: (QA follow-up) Attempt to clarify POD
Bug-37392-QA-follow-up-Attempt-to-clarify-POD.patch (text/plain), 3.92 KB, created by
Martin Renvoize (ashimema)
on 2024-10-30 07:23:53 UTC
(
hide
)
Description:
Bug 37392: (QA follow-up) Attempt to clarify POD
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-10-30 07:23:53 UTC
Size:
3.92 KB
patch
obsolete
>From 796184e6293944a729ff0f60677b14d2d3ef30a9 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 30 Oct 2024 07:21:36 +0000 >Subject: [PATCH] Bug 37392: (QA follow-up) Attempt to clarify POD > >This aptch attemptes to tidy up and clarify the POD for various 'things' >methods in the Koha::Patron class. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Patron.pm | 49 +++++++++++++++++++++++++++++++++++++------------ > 1 file changed, 37 insertions(+), 12 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 229f603921e..32e84b8f0c1 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -1860,7 +1860,8 @@ sub can_edit_items_from { > > Return the list of branchcodes(!) of libraries the patron is allowed to items for. > The branchcodes are arbitrarily returned sorted. >-We are supposing here that the object is related to the logged in patron (use of C4::Context::only_my_library) >+We are supposing here that the object is related to the logged in patron (use of >+C4::Context::only_my_library) > > An empty array means no restriction, the user can edit any item. > >@@ -1880,13 +1881,18 @@ sub libraries_where_can_edit_items { > > =head3 libraries_where_can_see_patrons > >-my $libraries = $patron->libraries_where_can_see_patrons; >+ my $libraries = $patron->libraries_where_can_see_patrons; >+ >+Return the list of branchcodes(!) of libraries the patron is allowed to see other >+patron's infos. > >-Return the list of branchcodes(!) of libraries the patron is allowed to see other patron's infos. > The branchcodes are arbitrarily returned sorted. >-We are supposing here that the object is related to the logged in patron (use of C4::Context::only_my_library) > >-An empty array means no restriction, the patron can see patron's infos from any libraries. >+We are supposing here that the object is related to the logged in patron (use of >+C4::Context::only_my_library) >+ >+An empty array means no restriction, the patron can see patron's infos from any >+libraries. > > =cut > >@@ -1904,9 +1910,17 @@ sub libraries_where_can_see_patrons { > > =head3 can_see_things_from > >-my $can_see = $patron->can_see_things_from( $branchcode ); >+ my $can_see = $patron->can_see_things_from( >+ { >+ branchcode => $branchcode, >+ permission => $permission, >+ subpermission => $subpermission, >+ group_feature => $group_feature >+ } >+ ); > >-Return true if the I<Koha::Patron> can perform some action on the given thing >+Return true if the I<Koha::Patron> can perform some action, as described by a >+permission, subpermission, group_feature combination, at the passed library. > > =cut > >@@ -1962,14 +1976,25 @@ sub can_log_into { > > =head3 libraries_where_can_see_things > >- my $libraries = $patron->libraries_where_can_see_things; >+ my $libraries = $patron->libraries_where_can_see_things( >+ { >+ permission => $permission, >+ subpermission => $subpermission, >+ group_feature => $group_feature >+ } >+ ); >+ >+Returns a list of libraries where this user is allowed to perform an action, as >+defined by a permission, subpermission, group_feature combination. > >-Returns a list of libraries where an aribitarary action is allowed to be taken by the logged in librarian >-against an object based on some branchcode related to the object ( patron branchcode, item homebranch, etc ). >+We account for `IndependentBranches` and permission/subpermission assignements >+before looking into library group allowances. > >-We are supposing here that the object is related to the logged in librarian (use of C4::Context::only_my_library) >+We are assuming here that the object is related to the logged in librarian (use >+of C4::Context::only_my_library) > >-An empty array means no restriction, the thing can see thing's infos from any libraries. >+An empty array means no restriction, the thing can see thing's infos from any >+libraries. > > =cut > >-- >2.47.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 37392
:
169433
|
169434
|
169515
|
169516
|
169517
|
170392
|
170393
|
170394
|
172698
|
172699
|
172700
|
173654
|
173655
|
173656
|
173657
|
173699
|
173700
|
173701
|
173702
| 173703 |
173871
|
173889
|
175413