my $e = new_rstore_editor(xact=>1, authtoken=>$auth);
return $e->die_event unless $e->checkauth;
return $e->die_event unless $e->allowed('RUN_REPORTS');
+ return $e->die_event unless ($type ne 'template' || $e->allowed('CREATE_REPORT_TEMPLATE'));
return 0 if $folder->owner ne $e->requestor->id;
my $e = new_rstore_editor(authtoken=>$auth, xact=>1);
return $e->die_event unless $e->checkauth;
return $e->die_event unless $e->allowed('RUN_REPORTS');
+ return $e->die_event unless $e->allowed('CREATE_REPORT_TEMPLATE');
$template->owner($e->requestor->id);
my $existing = $e->search_reporter_template( {owner=>$template->owner,
my $e = new_rstore_editor(authtoken=>$auth, xact=>1);
return $e->die_event unless $e->checkauth;
return $e->die_event unless $e->allowed('RUN_REPORTS');
+ return $e->die_event unless $e->allowed('CREATE_REPORT_TEMPLATE');
my $t = $e->retrieve_reporter_template($tmpl->id)
or return $e->die_event;
return 0 if $t->owner ne $e->requestor->id;
'Allows a user to manually adjust a patron''s active cards', 'ppl', 'description')),
( 515, 'UPDATE_PATRON_PRIMARY_CARD', oils_i18n_gettext( 515,
'Allows a user to manually adjust a patron''s primary card', 'ppl', 'description'));
+ 'Allows a user to use debug functions in the staff client', 'ppl', 'description' ));
+ ( 516, 'CREATE_REPORT_TEMPLATE', oils_i18n_gettext( 516,
+ 'Allows a user to create report templates', 'ppl', 'description' ));
SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
'CREATE_COPY_STAT_CAT_ENTRY',
'CREATE_COPY_STAT_CAT_ENTRY_MAP',
'RUN_REPORTS',
+ 'CREATE_REPORT_TEMPLATE',
'SHARE_REPORT_FOLDER',
'UPDATE_COPY_LOCATION',
'UPDATE_COPY_STAT_CAT',
'DELETE_INVOICE_METHOD',
'DELETE_PROVIDER',
'RUN_REPORTS',
+ 'CREATE_REPORT_TEMPLATE',
'SHARE_REPORT_FOLDER',
'UPDATE_ACQ_FUNDING_SOURCE',
'UPDATE_INVOICE_ITEM_TYPE',