SEBSLI-4 implementation
This commit is contained in:
parent
cd9fcff8f0
commit
75c559d01a
9 changed files with 27 additions and 26 deletions
|
@ -150,7 +150,7 @@ public class UserAccountList implements TemplateComposer {
|
|||
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<>(
|
||||
|
|
|
@ -194,7 +194,9 @@ public class UserActivityLogs implements TemplateComposer {
|
|||
? 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,
|
||||
|
|
|
@ -119,9 +119,7 @@ public class ConfigTemplateList implements TemplateComposer {
|
|||
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<>(
|
||||
|
|
|
@ -125,11 +125,11 @@ public class SEBClientConfigList implements TemplateComposer {
|
|||
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,
|
||||
|
|
|
@ -142,11 +142,11 @@ public class SEBExamConfigList implements TemplateComposer {
|
|||
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,
|
||||
|
|
|
@ -172,12 +172,12 @@ public class ExamList implements TemplateComposer {
|
|||
.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<Exam>(
|
||||
Domain.EXAM.ATTR_INSTITUTION_ID,
|
||||
COLUMN_TITLE_INSTITUTION_KEY,
|
||||
|
|
|
@ -135,12 +135,11 @@ public class ExamTemplateList implements TemplateComposer {
|
|||
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<ExamTemplate>(
|
||||
Domain.EXAM_TEMPLATE.ATTR_INSTITUTION_ID,
|
||||
COLUMN_TITLE_INSTITUTION_KEY,
|
||||
|
|
|
@ -124,11 +124,11 @@ public class LmsSetupList implements TemplateComposer {
|
|||
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,
|
||||
|
|
|
@ -193,7 +193,9 @@ public class QuizLookupList implements TemplateComposer {
|
|||
.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>(
|
||||
QuizData.QUIZ_ATTR_INSTITUTION_ID,
|
||||
INSTITUTION_TEXT_KEY,
|
||||
|
|
Loading…
Reference in a new issue