diff --git a/configs/app.config.ts b/configs/app.config.ts index 5c8df770..f4609ebb 100644 --- a/configs/app.config.ts +++ b/configs/app.config.ts @@ -175,6 +175,47 @@ const wayf = { ] as { name: string, entityID: string }[], } +/** + * These are due to temporary constraints + * in the future, all features will be enabled and the settings will be deleted. + */ +const features = { + /** repositories feature flags */ + repositories: { + /** + * If true, the search will be performed on the server side. + * If false, the search will be performed on the client (browser) side. + */ + 'server-search': false, + + /** Whether to allow sorting columns */ + 'sort-columns': false, + }, + /** groups feature flags */ + groups: { + /** Whether to allow sorting columns */ + 'sort-columns': false, + }, + /** users feature flags */ + users: { + /** Whether to allow filters to be applied at the same time for both roles and groups */ + 'filter-by-both-role-group': false, + /** Whether to allow the last modified filter */ + 'filter-by-last-modified': false, + /** Whether to allow the search by username only */ + 'search-only-username': true, + /** Whether to allow sorting columns */ + 'sort-columns': false, + /** Whether to display file upload button */ + 'file-upload': false, + }, + /** history feature flags */ + history: { + /** Whether to display history upload tab */ + upload: false, + }, +} + export default { /** Server hostname of this application */ serverName, @@ -192,4 +233,10 @@ export default { polling, /** WAYF (Embedded DS) configuration */ wayf, + /** + * Feature flags configuration. \ + * These are due to temporary constraints + * in the future, all features will be enabled and the settings will be deleted. + */ + features, } diff --git a/configs/server.config.toml b/configs/server.config.toml index 6e185bde..94918c43 100644 --- a/configs/server.config.toml +++ b/configs/server.config.toml @@ -237,3 +237,15 @@ url = "amqp://guest:guest@rabbitmq:5672//" # user name of the developer account. # user_name = "" + + +# Feature flags for enabling or disabling application features. +# These are due to temporary constraints +# in the future, all features will be enabled and the settings will be deleted. +[features] +# Whether user search by user name only in users. +# If false, Enable search by username, email, or ePPN. +search_only_username = true + +# Whether mAP Core API bulk operation is enabled or disabled. +enable_bulk_operation = false diff --git a/src/app/components/group/GroupForm.vue b/src/app/components/group/GroupForm.vue index a0b888fa..56c9bcb5 100644 --- a/src/app/components/group/GroupForm.vue +++ b/src/app/components/group/GroupForm.vue @@ -14,7 +14,10 @@ const emit = defineEmits<{ 'cancel': [] }>() -const { table: { pageSize } } = useAppConfig() +const { + table: { pageSize }, + features: { repositories: { 'server-search': serverSearch } }, +} = useAppConfig() const { schema, getMaxIdLength } = useGroupSchema(() => properties.mode) const { handleFormError } = useFormError() @@ -51,6 +54,7 @@ const { label: repository.serviceName, value: repository.id, }), + server: serverSearch, }) setupRepoScroll(repositorySelect) @@ -96,7 +100,8 @@ const onCancel = () => { v-model="state.repository as { label: string, value: string }" v-model:search-term="repoSearchTerm" size="xl" :placeholder="$t('group.placeholder.repository')" - :items="repositoryNames" :loading="repoSearchStatus === 'pending'" ignore-filter + :items="repositoryNames" :loading="repoSearchStatus === 'pending'" + :ignore-filter="serverSearch" :ui="{ base: 'w-full' }" :disabled="mode !== 'new'" @update:open="onRepoOpen" /> diff --git a/src/app/components/history/HistoryFilter.vue b/src/app/components/history/HistoryFilter.vue index 4113213e..b510145b 100644 --- a/src/app/components/history/HistoryFilter.vue +++ b/src/app/components/history/HistoryFilter.vue @@ -1,4 +1,6 @@