diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserAccountList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserAccountList.java index 78be8811b..6d4995372 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserAccountList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserAccountList.java @@ -150,7 +150,7 @@ public void compose(final PageContext pageContext) { restService.getRestCall(GetUserAccountPage.class)) .withEmptyMessage(EMPTY_TEXT_KEY) .withPaging(this.pageSize) - .withDefaultSort(isSEBAdmin ? Domain.USER.ATTR_INSTITUTION_ID : Domain.USER.ATTR_NAME) + .withDefaultSort(Domain.USER.ATTR_NAME) .withColumnIf( () -> isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), () -> new ColumnDefinition<>( diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserActivityLogs.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserActivityLogs.java index 068ea3d08..18e7daaf8 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserActivityLogs.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/admin/UserActivityLogs.java @@ -194,7 +194,9 @@ public void compose(final PageContext pageContext) { ? UserActivityLog.FILTER_ATTR_INSTITUTION : UserActivityLog.ATTR_USER_NAME) .withColumnIf( - () -> isSEBAdmin.getAsBoolean() && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), + () -> isSEBAdmin.getAsBoolean() + && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) + && !pageService.isSEBServerLightSetup(), () -> new ColumnDefinition<>( UserActivityLog.FILTER_ATTR_INSTITUTION, INSTITUTION_TEXT_KEY, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/ConfigTemplateList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/ConfigTemplateList.java index 5fe9a07d4..a2f68b827 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/ConfigTemplateList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/ConfigTemplateList.java @@ -119,9 +119,7 @@ public void compose(final PageContext pageContext) { ConfigurationType.TEMPLATE.name()) .withEmptyMessage(EMPTY_TEMPLATE_LIST_TEXT_KEY) .withPaging(this.pageSize) - .withDefaultSort(isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) - ? Domain.LMS_SETUP.ATTR_INSTITUTION_ID - : Domain.CONFIGURATION_NODE.ATTR_NAME) + .withDefaultSort(Domain.CONFIGURATION_NODE.ATTR_NAME) .withColumnIf( () -> isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), () -> new ColumnDefinition<>( diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBClientConfigList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBClientConfigList.java index 19018e095..afae6f33d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBClientConfigList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBClientConfigList.java @@ -125,11 +125,11 @@ public void compose(final PageContext pageContext) { this.pageService.entityTableBuilder(this.restService.getRestCall(GetClientConfigPage.class)) .withEmptyMessage(EMPTY_LIST_TEXT_KEY) .withPaging(this.pageSize) - .withDefaultSort(isSEBAdmin - ? Domain.LMS_SETUP.ATTR_INSTITUTION_ID - : Domain.SEB_CLIENT_CONFIGURATION.ATTR_NAME) + .withDefaultSort(Domain.SEB_CLIENT_CONFIGURATION.ATTR_NAME) .withColumnIf( - () -> isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), + () -> isSEBAdmin + && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) + && !pageService.isSEBServerLightSetup(), () -> new ColumnDefinition<>( Domain.LMS_SETUP.ATTR_INSTITUTION_ID, INSTITUTION_TEXT_KEY, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBExamConfigList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBExamConfigList.java index 55e69c8da..674f7c6f6 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBExamConfigList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/configs/SEBExamConfigList.java @@ -142,11 +142,11 @@ public void compose(final PageContext pageContext) { ConfigurationType.EXAM_CONFIG.name()) .withEmptyMessage(EMPTY_CONFIG_LIST_TEXT_KEY) .withPaging(this.pageSize) - .withDefaultSort(isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) - ? Domain.LMS_SETUP.ATTR_INSTITUTION_ID - : Domain.CONFIGURATION_NODE.ATTR_NAME) + .withDefaultSort(Domain.CONFIGURATION_NODE.ATTR_NAME) .withColumnIf( - () -> isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), + () -> isSEBAdmin + && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) + && !pageService.isSEBServerLightSetup(), () -> new ColumnDefinition<>( Domain.LMS_SETUP.ATTR_INSTITUTION_ID, INSTITUTION_TEXT_KEY, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamList.java index 532d437a3..3f31b0369 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamList.java @@ -172,12 +172,12 @@ public void compose(final PageContext pageContext) { .withPaging(this.pageSize) .withRowDecorator(decorateOnExamConsistency(this.pageService)) .withStaticFilter(Exam.FILTER_ATTR_ACTIVE, Constants.TRUE_STRING) - .withDefaultSort(isSEBAdmin.getAsBoolean() && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) - ? Domain.EXAM.ATTR_INSTITUTION_ID - : Domain.EXAM.ATTR_LMS_SETUP_ID) + .withDefaultSort(Domain.EXAM.ATTR_QUIZ_NAME) .withColumnIf( - () -> isSEBAdmin.getAsBoolean() && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), + () -> isSEBAdmin.getAsBoolean() + && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) + && !pageService.isSEBServerLightSetup(), () -> new ColumnDefinition( Domain.EXAM.ATTR_INSTITUTION_ID, COLUMN_TITLE_INSTITUTION_KEY, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamTemplateList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamTemplateList.java index 11576792b..de0eab478 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamTemplateList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/ExamTemplateList.java @@ -135,12 +135,11 @@ public void compose(final PageContext pageContext) { this.pageService.entityTableBuilder(restService.getRestCall(GetExamTemplatePage.class)) .withEmptyMessage(EMPTY_LIST_TEXT_KEY) .withPaging(this.pageSize) - .withDefaultSort(isSEBAdmin.getAsBoolean() && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) - ? Domain.EXAM_TEMPLATE.ATTR_INSTITUTION_ID - : Domain.EXAM_TEMPLATE.ATTR_NAME) + .withDefaultSort(Domain.EXAM_TEMPLATE.ATTR_NAME) .withColumnIf( - () -> isSEBAdmin.getAsBoolean() && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), + () -> isSEBAdmin.getAsBoolean() + && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), () -> new ColumnDefinition( Domain.EXAM_TEMPLATE.ATTR_INSTITUTION_ID, COLUMN_TITLE_INSTITUTION_KEY, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/LmsSetupList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/LmsSetupList.java index 0c2c525de..0abf41260 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/LmsSetupList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/LmsSetupList.java @@ -124,11 +124,11 @@ public void compose(final PageContext pageContext) { this.pageService.entityTableBuilder(restService.getRestCall(GetLmsSetupPage.class)) .withEmptyMessage(EMPTY_LIST_TEXT_KEY) .withPaging(this.pageSize) - .withDefaultSort(isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) - ? Domain.LMS_SETUP.ATTR_INSTITUTION_ID - : Domain.LMS_SETUP.ATTR_NAME) + .withDefaultSort(Domain.LMS_SETUP.ATTR_NAME) .withColumnIf( - () -> !isLight && isSEBAdmin && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), + () -> !isLight + && isSEBAdmin + && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), () -> new ColumnDefinition<>( Domain.LMS_SETUP.ATTR_INSTITUTION_ID, INSTITUTION_TEXT_KEY, diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/QuizLookupList.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/QuizLookupList.java index b297e4004..89a63ff6d 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/QuizLookupList.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/exam/QuizLookupList.java @@ -193,7 +193,9 @@ public void compose(final PageContext pageContext) { .withPaging(this.pageSize) .withColumnIf( - () -> isSEBAdmin.getAsBoolean() && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION), + () -> isSEBAdmin.getAsBoolean() + && currentUser.isFeatureEnabled(UserFeatures.Feature.ADMIN_INSTITUTION) + && !pageService.isSEBServerLightSetup(), () -> new ColumnDefinition( QuizData.QUIZ_ATTR_INSTITUTION_ID, INSTITUTION_TEXT_KEY,