Shubhendu Tripathi has posted comments on this change. Change subject: gluster: Added app_mode field to roles table ......................................................................
Patch Set 6: (6 comments) .................................................... File packaging/dbscripts/multi_level_administration_sp.sql Line 250: AS $procedure$ Line 251: BEGIN Line 252: RETURN QUERY SELECT * Line 253: FROM roles Line 254: WHERE roles.app_mode & v_app_mode > 0; Will do the changes accordingly Line 255: Line 256: END; $procedure$ Line 257: LANGUAGE plpgsql; Line 258: Line 293: BEGIN Line 294: RETURN QUERY SELECT roles.* Line 295: FROM roles INNER JOIN Line 296: permissions ON permissions.role_id = roles.id Line 297: WHERE roles.app_mode & v_app_mode > 0 Will do the changes accordingly Line 298: AND (permissions.ad_element_id = v_user_id Line 299: or permissions.ad_element_id in(select id from getElementIdsByIdAndGroups(v_user_id, v_group_ids))); Line 300: Line 301: END; $procedure$ .................................................... File packaging/dbscripts/upgrade/03_03_0800_add_app_mode_to_roles.sql Line 1: -- adding app_mode column to roles table to store the application mode for which the said role is meant for. Will correct the comments Line 2: -- Following is the detail of application modes Line 3: -- Virt - 1 Line 4: -- Gluster - 2 Line 5: -- All - 255 Line 1: -- adding app_mode column to roles table to store the application mode for which the said role is meant for. Line 2: -- Following is the detail of application modes Will correct the comments Line 3: -- Virt - 1 Line 4: -- Gluster - 2 Line 5: -- All - 255 Line 6: select fn_db_add_column('roles', 'app_mode', 'INTEGER'); Line 6: select fn_db_add_column('roles', 'app_mode', 'INTEGER'); Line 7: Line 8: UPDATE roles SET app_mode=1 WHERE name in ('UserRole', 'PowerUserRole', 'DataCenterAdmin', 'StorageAdmin', 'UserVmManager', 'VmPoolAdmin', 'TemplateAdmin', 'TemplateUser', 'QuotaConsumer', 'TemplateOwner', 'DiskOperator', 'DiskCreator', 'VmCreator', 'TemplateCreator', 'VnicProfileUser'); Line 9: UPDATE roles SET app_mode=2 WHERE name='GlusterAdmin'; Line 10: UPDATE roles SET app_mode=255 WHERE name in ('ClusterAdmin', 'SuperUser', 'HostAdmin', 'NetworkAdmin', 'ExternalEventsCreator', 'ExternalTasksCreator'); Will do the changes Line 11: Line 12: -- Create the constraint Line 13: ALTER TABLE roles ALTER COLUMN app_mode SET NOT NULL; Line 14: Line 12: -- Create the constraint Line 13: ALTER TABLE roles ALTER COLUMN app_mode SET NOT NULL; Line 14: Line 15: -- Create the index Line 16: DROP INDEX if exists IDX_roles__app_mode; Will remove the statement -- To view, visit http://gerrit.ovirt.org/18592 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id83b7a2c90100744487b276642158e7c3e93de85 Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shubhendu Tripathi <shtri...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com> Gerrit-Reviewer: Sahina Bose <sab...@redhat.com> Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches