# safety
-#__PACKAGE__->run_before('check_auth');
+__PACKAGE__->run_before('check_auth');
#
# actions
SL::DB::Manager::Employee->get_all_sorted;
}
+sub check_auth {
+ $::auth->assert('time_recording');
+}
+
sub prepare_report {
my ($self) = @_;
id: system_time_recording_types
name: Time Recording Types
order: 2370
+ access: config
params:
action: SimpleSystemSetting/list
type: time_recording_type
id: productivity_time_recording
name: Time Recording
order: 350
+ access: time_recording
params:
action: TimeRecording/edit
- parent: productivity_reports
id: productivity_reports_time_recording
name: Time Recording
order: 300
+ access: time_recording
params:
action: TimeRecording/list
--- /dev/null
+-- @tag: right_time_recording
+-- @description: Recht zur Zeiterfassung
+-- @depends: release_3_5_6_1
+-- @locales: Create, edit and list time recordings
+
+INSERT INTO auth.master_rights (position, name, description, category)
+ VALUES ((SELECT position + 10 FROM auth.master_rights WHERE name = 'productivity'),
+ 'time_recording',
+ 'Create, edit and list time recordings',
+ FALSE);