|
Lines 70-75
sub Preference {
Link Here
|
| 70 |
return C4::Context->preference($pref); |
70 |
return C4::Context->preference($pref); |
| 71 |
} |
71 |
} |
| 72 |
|
72 |
|
|
|
73 |
=head3 debug_flag |
| 74 |
|
| 75 |
This method checks if the currently logged in user is allowed |
| 76 |
access to the new debug ui permission. It should return |
| 77 |
0 if no one is logged in or context is unavailable for some other reason |
| 78 |
or they do not have the permission |
| 79 |
1 if they are a superlibrarian |
| 80 |
1<<31 if they do have the permission |
| 81 |
|
| 82 |
=cut |
| 83 |
|
| 84 |
sub debug_flag { |
| 85 |
return 0 unless C4::Context->userenv(); |
| 86 |
return 1 if C4::Context->IsSuperLibrarian(); |
| 87 |
my $flags = C4::Context->userenv()->{'flags'}; |
| 88 |
my $mask = 1 << 31; |
| 89 |
return $flags & $mask; |
| 90 |
|
| 91 |
} |
| 92 |
|
| 73 |
=head3 CSVDelimiter |
93 |
=head3 CSVDelimiter |
| 74 |
|
94 |
|
| 75 |
The delimiter option 'tabs' is stored in the DB as 'tabulation' to avoid issues |
95 |
The delimiter option 'tabs' is stored in the DB as 'tabulation' to avoid issues |