View | Details | Raw Unified | Return to bug 20956
Collapse All | Expand All

(-)a/Koha/Patron.pm (-9 / +16 lines)
Lines 3597-3605 sub is_anonymous { Link Here
3597
3597
3598
my $flags = $patron->permissions
3598
my $flags = $patron->permissions
3599
3599
3600
Returns a structure such as:
3600
Returns a hashref of the patron's permissions. This method has the same
3601
return structure as C4::Auth::getuserflags for consistency.
3602
3603
Exemple return structure:
3601
{
3604
{
3602
  "permissions": 1,
3605
  "superlibrarian": 0,
3606
  "permissions": 0,
3603
  "borrowers": 1,
3607
  "borrowers": 1,
3604
  "circulate": {
3608
  "circulate": {
3605
    "manage_curbside_pickups": 1,
3609
    "manage_curbside_pickups": 1,
Lines 3610-3622 Returns a structure such as: Link Here
3610
    "manage_bookings": 1
3614
    "manage_bookings": 1
3611
  },
3615
  },
3612
  "catalogue": 1,
3616
  "catalogue": 1,
3613
  "reserveforothers": {
3617
  "reserveforothers": 0,
3614
    "place_holds": 1,
3618
  "tools": 0,
3615
    "modify_holds_priority": 1
3619
  ...
3616
  }
3620
3617
}
3621
}
3618
where a 1 indicates full permissions and a hash indicates
3622
3619
partial permissions with the given permissions as hash keys
3623
All permission flags are included in the returned hashref:
3624
- Flags set to 1 indicate the user has full permissions for that module
3625
- Flags set to 0 indicate the user does not have that permission
3626
- Flags set to a hashref indicate partial/granular permissions, where the
3627
  hash keys are the specific subpermissions granted
3620
3628
3621
=cut
3629
=cut
3622
3630
3623
- 

Return to bug 20956