Lior Vernia has posted comments on this change. Change subject: webadmin: gui for adding macPool permissions. ......................................................................
Patch Set 21: (4 comments) http://gerrit.ovirt.org/#/c/32211/21/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetPermissionsForObjectQuery.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetPermissionsForObjectQuery.java: Are the changes in this file and in PermissionDAO necessary for the MAC pool permission subtab? Are they still required at all? If it's a refactoring, it probably belongs in a different patch. Line 1: package org.ovirt.engine.core.bll; Line 2: Line 3: import java.util.List; Line 4: http://gerrit.ovirt.org/#/c/32211/21/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/macpool/PermissionModelProvider.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/macpool/PermissionModelProvider.java: Line 15: import com.google.gwt.event.shared.EventBus; Line 16: import com.google.inject.Inject; Line 17: import com.google.inject.Provider; Line 18: Line 19: public class PermissionModelProvider extends SearchableTabModelProvider<Permissions, PermissionListModel> { Please try to implement this class so it can be reused as a subtab provider in all the main tab modules (e.g. NetworkModule) - this could make for a nice follow-up patch to remove a lot of duplicate code. I haven't looked thoroughly, but I think it should be feasible - let me know if I'm wrong. Line 20: Line 21: private final Provider<RemoveConfirmationPopupPresenterWidget> removeConfirmPopupProvider; Line 22: private final Provider<PermissionsPopupPresenterWidget> permissionPopupProvider; Line 23: Line 23: Line 24: @Inject Line 25: public PermissionModelProvider(EventBus eventBus, Line 26: Provider<DefaultConfirmationPopupPresenterWidget> defaultConfirmPopupProvider, Line 27: Provider<RemoveConfirmationPopupPresenterWidget> removeConfirmPopupProvider, There's a special removal dialog for permissions, which also states the current user trying to perform the action - you should probably use RolePermissionsRemoveConfirmationPopupPresenterWidget. Line 28: Provider<PermissionsPopupPresenterWidget> permissionPopupProvider) { Line 29: super(eventBus, defaultConfirmPopupProvider); Line 30: this.removeConfirmPopupProvider = removeConfirmPopupProvider; Line 31: this.permissionPopupProvider = permissionPopupProvider; Line 34: @Override Line 35: public PermissionListModel getModel() { Line 36: for (EntityModel entityModel : getCommonModel().getSharedMacPoolListModel().getDetailModels()) { Line 37: if (entityModel != null && entityModel instanceof PermissionListModel) { Line 38: return (PermissionListModel)entityModel; Missing space, please format the file... Line 39: } Line 40: } Line 41: Line 42: throw new IllegalStateException("Unable to find PermissionListModel in SharedMacPoolListModels DetailModels"); //$NON-NLS-1$ -- To view, visit http://gerrit.ovirt.org/32211 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idb6b442e7eebce367b9008f4b9c1df9ade84745f Gerrit-PatchSet: 21 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org 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