Eli Mesika has posted comments on this change. Change subject: core: Add role of VM run time manager. ......................................................................
Patch Set 3: (2 comments) http://gerrit.ovirt.org/#/c/37094/3/packaging/dbscripts/upgrade/03_06_0760_add_vm_run_time_permissions.sql File packaging/dbscripts/upgrade/03_06_0760_add_vm_run_time_permissions.sql: Line 8: v_VM_RUN_TIME_MANAGER_ID := 'DEF00006-0000-0000-0000-DEF000000011'; Line 9: Line 10: -- Add user role for vm run time manager Line 11: INSERT INTO roles(id,name,description,is_readonly,role_type, app_mode) SELECT v_VM_RUN_TIME_MANAGER_ID, 'UserVmRunTimeManager', 'User Role, with permissions for any operations on VMs except snapshot manipulation', true, 2, 1 Line 12: WHERE NOT EXISTS (SELECT id,name,description,is_readonly,role_type You don't need to check for existence , this script will run only once when this record is absolutely not there .... Line 13: FROM roles Line 14: WHERE id = v_VM_RUN_TIME_MANAGER_ID Line 15: AND name='UserVmRunTimeManager' Line 16: AND description='User Role, with permissions for any operations on VMs except snapshot manipulation' Line 21: -- copy the properties of VM_OPERATOR role (role_id = def00006-0000-0000-0000-def000000006) without the vm snpashot manipulation (action group id = 12) to the new role of VM_RUN_TIME_MANAGER_ID. Line 22: INSERT INTO roles_groups (role_id, action_group_id) Line 23: SELECT v_VM_RUN_TIME_MANAGER_ID, action_group_id Line 24: FROM roles_groups a Line 25: WHERE role_id = 'def00006-0000-0000-0000-def000000006' AND action_group_id <> 12; please use != rather than <> Line 26: Line 27: END; $procedure$ Line 28: LANGUAGE plpgsql; Line 29: -- To view, visit http://gerrit.ovirt.org/37094 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifc0e2484aabee5779d6bfaf44e25bab0511e8e16 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
