X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=sql%2FPg-upgrade2-auth%2Fright_productivity_as_category.sql;fp=sql%2FPg-upgrade2-auth%2Fright_productivity_as_category.sql;h=3f161fca5ab3e529e5b626d6b40472ea897e66b4;hb=53593baa211863fbf66540cf1bcc36c8fb37257f;hp=0000000000000000000000000000000000000000;hpb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44;p=kivitendo-erp.git diff --git a/sql/Pg-upgrade2-auth/right_productivity_as_category.sql b/sql/Pg-upgrade2-auth/right_productivity_as_category.sql new file mode 100644 index 000000000..3f161fca5 --- /dev/null +++ b/sql/Pg-upgrade2-auth/right_productivity_as_category.sql @@ -0,0 +1,26 @@ +-- @tag: right_productivity_as_category +-- @description: Rechte: Produktivität als eigene Kategorie +-- @depends: master_rights_positions_fix +-- @locales: Productivity (TODO list, Follow-Ups) + +-- make space before 'configuration' +UPDATE auth.master_rights SET position = position+1000 + WHERE position >= (SELECT position FROM auth.master_rights WHERE name LIKE 'configuration'); + +-- insert category for productivity before 'configuration' +INSERT INTO auth.master_rights (position, name, description, category) + VALUES ((SELECT position FROM auth.master_rights WHERE name LIKE 'configuration') - 1000, + 'productivity_category', + 'Productivity', + TRUE); + +-- move productivity rights below 'productivity_category' +UPDATE auth.master_rights SET position = (SELECT position FROM auth.master_rights WHERE name LIKE 'productivity_category') + 100, + description = 'Productivity (TODO list, Follow-Ups)' + WHERE name LIKE 'productivity'; + +UPDATE auth.master_rights SET position = (SELECT position FROM auth.master_rights WHERE name LIKE 'productivity_category') + 200 + WHERE name LIKE 'email_journal'; + +UPDATE auth.master_rights SET position = (SELECT position FROM auth.master_rights WHERE name LIKE 'productivity_category') + 250 + WHERE name LIKE 'email_employee_readall';