epic-s6ts
[kivitendo-erp.git] / sql / Pg-upgrade2-auth / rights_time_recording_show_edit_all.sql
1 -- @tag: rights_time_recording_show_edit_all
2 -- @description: Rechte, Zeiterfassungseinträge aller Mitarbeiter anzuzeigen bzw. zu bearbeiten
3 -- @depends: right_time_recording
4 -- @locales: List time recordings of all staff members
5 -- @locales: Edit time recordings of all staff members
6
7 INSERT INTO auth.master_rights (position, name, description, category)
8   VALUES ((SELECT position + 20 FROM auth.master_rights WHERE name = 'time_recording'),
9           'time_recording_show_all',
10           'List time recordings of all staff members',
11           FALSE);
12
13 INSERT INTO auth.group_rights (group_id, "right", granted)
14   SELECT id, 'time_recording_show_all', true
15   FROM auth.group
16   WHERE name = 'Vollzugriff';
17
18 INSERT INTO auth.master_rights (position, name, description, category)
19   VALUES ((SELECT position + 20 FROM auth.master_rights WHERE name = 'time_recording_show_all'),
20           'time_recording_edit_all',
21           'Edit time recordings of all staff members',
22           FALSE);
23
24 INSERT INTO auth.group_rights (group_id, "right", granted)
25   SELECT id, 'time_recording_edit_all', true
26   FROM auth.group
27   WHERE name = 'Vollzugriff';