mooli tayer has uploaded a new change for review. Change subject: core: sort domain names a-b ascending, 'internal' always last. ......................................................................
core: sort domain names a-b ascending, 'internal' always last. Change-Id: Ia3d0a64c872f8d2a018be08587303b5358c3a18c Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1115549 Signed-off-by: Mooli Tayer <mta...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAAAProfileListQuery.java 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/21/29721/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAAAProfileListQuery.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAAAProfileListQuery.java index cd52396..4fc2c1b 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAAAProfileListQuery.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAAAProfileListQuery.java @@ -5,7 +5,11 @@ import org.ovirt.engine.core.aaa.AuthenticationProfile; import org.ovirt.engine.core.aaa.AuthenticationProfileRepository; +import org.ovirt.engine.core.common.config.Config; +import org.ovirt.engine.core.common.config.ConfigValues; import org.ovirt.engine.core.common.queries.VdcQueryParametersBase; + +import static java.util.Collections.sort; public class GetAAAProfileListQuery<P extends VdcQueryParametersBase> extends QueriesCommandBase<P> { @@ -20,6 +24,10 @@ for (AuthenticationProfile profile : profiles) { names.add(profile.getName()); } + + // Sort it so that the internal profile is always the last: + sort(names, new LoginDomainComparator(Config.<String> getValue(ConfigValues.AdminDomain))); + getQueryReturnValue().setReturnValue(names); } -- To view, visit http://gerrit.ovirt.org/29721 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia3d0a64c872f8d2a018be08587303b5358c3a18c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: mooli tayer <mta...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches