replacement for bug 3817 added patron permissions for tag tool
This commit is contained in:
parent
45361b5583
commit
cef321e7bd
|
|
@ -31,6 +31,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
|
|||
(13, 'batchmod', 'Perform batch modification of items'),
|
||||
(13, 'batchdel', 'Perform batch deletion of items'),
|
||||
(13, 'manage_csv_profiles', 'Manage CSV export profiles'),
|
||||
(13, 'moderate_tags', 'Moderate patron tags'),
|
||||
(16, 'execute_reports', 'Execute SQL reports'),
|
||||
(16, 'create_reports', 'Create SQL Reports')
|
||||
;
|
||||
|
|
|
|||
|
|
@ -3305,6 +3305,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
|||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
$DBversion = "XXX";
|
||||
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||
$dbh->do("INSERT INTO permissions (module_bit, code, description) VALUES (13, 'moderate_tags', 'Moderate patron tags')");
|
||||
print "Upgrade done (adding patron permissions for tags tool)\n";
|
||||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
=item DropAllForeignKeys($table)
|
||||
|
||||
Drop all foreign keys of the table $table
|
||||
|
|
|
|||
|
|
@ -30,7 +30,8 @@
|
|||
<!-- TMPL_IF NAME="CAN_user_tools_moderate_comments" -->
|
||||
<li><a href="/cgi-bin/koha/reviews/reviewswaiting.pl">Moderate OPAC comments</a></li>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="CAN_user_tools_moderate_comments" --><!-- FIXME: Update here when Tag specific permission is created. --><li><a href="/cgi-bin/koha/tags/review.pl">Moderate patron tags</a></li>
|
||||
<!-- TMPL_IF NAME="CAN_user_tools_moderate_tags" -->
|
||||
<li><a href="/cgi-bin/koha/tags/review.pl">Moderate patron tags</a></li>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_IF NAME="CAN_user_tools_manage_csv_profiles" -->
|
||||
<li><a href="/cgi-bin/koha/tools/csv-profiles.pl">CSV Profiles</a></li>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
<dd>Moderate patron comments</dd>
|
||||
<!-- /TMPL_IF -->
|
||||
|
||||
<!-- TMPL_IF NAME="CAN_user_tools_moderate_comments" --><!-- FIXME: Update here when Tag specific permission is created. -->
|
||||
<!-- TMPL_IF NAME="CAN_user_tools_moderate_tags" -->
|
||||
<dt><a href="/cgi-bin/koha/tags/review.pl">Tags</a></dt>
|
||||
<dd>Moderate patron tags</dd>
|
||||
<!-- /TMPL_IF -->
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ use C4::Debug;
|
|||
use C4::Tags 0.03 qw(get_tags get_approval_rows approval_counts whitelist blacklist is_approved);
|
||||
|
||||
my $script_name = "/cgi-bin/koha/tags/review.pl";
|
||||
my $needed_flags = { tools => 'moderate_comments' }; # FIXME: replace when more specific permission is created.
|
||||
my $needed_flags = { tools => 'moderate_tags' }; # FIXME: replace when more specific permission is created.
|
||||
|
||||
sub ajax_auth_cgi ($) { # returns CGI object
|
||||
my $needed_flags = shift;
|
||||
|
|
|
|||
Loading…
Reference in New Issue