feat: auth + storage config improvements
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
.body-2.grey--text.text--darken-1 Select which authentication strategies to enable:
|
||||
.caption.grey--text.pb-2 Some strategies require additional configuration in their dedicated tab (when selected).
|
||||
v-form
|
||||
v-checkbox(
|
||||
v-checkbox.my-1(
|
||||
v-for='strategy in strategies'
|
||||
v-model='strategy.isEnabled'
|
||||
:key='strategy.key'
|
||||
@@ -27,14 +27,30 @@
|
||||
v-form
|
||||
v-subheader.pl-0 Strategy Configuration
|
||||
.body-1.ml-3(v-if='!strategy.config || strategy.config.length < 1') This strategy has no configuration options you can modify.
|
||||
v-text-field(
|
||||
v-else
|
||||
v-for='cfg in strategy.config'
|
||||
:key='cfg.key'
|
||||
:label='cfg.key'
|
||||
v-model='cfg.value'
|
||||
prepend-icon='settings_applications'
|
||||
template(v-else, v-for='cfg in strategy.config')
|
||||
v-select(
|
||||
v-if='cfg.value.type === "string" && cfg.value.enum'
|
||||
:items='cfg.value.enum'
|
||||
:key='cfg.key'
|
||||
:label='cfg.key | startCase'
|
||||
v-model='cfg.value.value'
|
||||
prepend-icon='settings_applications'
|
||||
)
|
||||
v-switch(
|
||||
v-else-if='cfg.value.type === "boolean"'
|
||||
:key='cfg.key'
|
||||
:label='cfg.key | startCase'
|
||||
v-model='cfg.value.value'
|
||||
color='primary'
|
||||
prepend-icon='settings_applications'
|
||||
)
|
||||
v-text-field(
|
||||
v-else
|
||||
:key='cfg.key'
|
||||
:label='cfg.key | startCase'
|
||||
v-model='cfg.value.value'
|
||||
prepend-icon='settings_applications'
|
||||
)
|
||||
v-divider
|
||||
v-subheader.pl-0 Registration
|
||||
.pr-3
|
||||
@@ -90,6 +106,9 @@ import strategiesQuery from 'gql/admin/auth/auth-query-strategies.gql'
|
||||
import strategiesSaveMutation from 'gql/admin/auth/auth-mutation-save-strategies.gql'
|
||||
|
||||
export default {
|
||||
filters: {
|
||||
startCase(val) { return _.startCase(val) }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
groups: [],
|
||||
@@ -122,7 +141,7 @@ export default {
|
||||
'selfRegistration',
|
||||
'domainWhitelist',
|
||||
'autoEnrollGroups'
|
||||
]))
|
||||
])).map(str => ({...str, config: str.config.map(cfg => ({...cfg, value: cfg.value.value}))}))
|
||||
}
|
||||
})
|
||||
this.$store.commit('showNotification', {
|
||||
@@ -137,7 +156,7 @@ export default {
|
||||
strategies: {
|
||||
query: strategiesQuery,
|
||||
fetchPolicy: 'network-only',
|
||||
update: (data) => _.cloneDeep(data.authentication.strategies),
|
||||
update: (data) => _.cloneDeep(data.authentication.strategies).map(str => ({...str, config: str.config.map(cfg => ({...cfg, value: JSON.parse(cfg.value)}))})),
|
||||
watchLoading (isLoading) {
|
||||
this.$store.commit(`loading${isLoading ? 'Start' : 'Stop'}`, 'admin-auth-refresh')
|
||||
}
|
||||
|
@@ -12,7 +12,7 @@
|
||||
.body-2.grey--text.text--darken-1 Select which storage targets to enable:
|
||||
.caption.grey--text.pb-2 Some storage targets require additional configuration in their dedicated tab (when selected).
|
||||
v-form
|
||||
v-checkbox(
|
||||
v-checkbox.my-1(
|
||||
v-for='tgt in targets'
|
||||
v-model='tgt.isEnabled'
|
||||
:key='tgt.key'
|
||||
@@ -27,14 +27,30 @@
|
||||
v-form
|
||||
v-subheader.pl-0 Target Configuration
|
||||
.body-1.ml-3(v-if='!tgt.config || tgt.config.length < 1') This storage target has no configuration options you can modify.
|
||||
v-text-field(
|
||||
v-else
|
||||
v-for='cfg in tgt.config'
|
||||
:key='cfg.key'
|
||||
:label='cfg.key'
|
||||
v-model='cfg.value'
|
||||
prepend-icon='settings_applications'
|
||||
template(v-else, v-for='cfg in tgt.config')
|
||||
v-select(
|
||||
v-if='cfg.value.type === "string" && cfg.value.enum'
|
||||
:items='cfg.value.enum'
|
||||
:key='cfg.key'
|
||||
:label='cfg.key | startCase'
|
||||
v-model='cfg.value.value'
|
||||
prepend-icon='settings_applications'
|
||||
)
|
||||
v-switch(
|
||||
v-else-if='cfg.value.type === "boolean"'
|
||||
:key='cfg.key'
|
||||
:label='cfg.key | startCase'
|
||||
v-model='cfg.value.value'
|
||||
color='primary'
|
||||
prepend-icon='settings_applications'
|
||||
)
|
||||
v-text-field(
|
||||
v-else
|
||||
:key='cfg.key'
|
||||
:label='cfg.key | startCase'
|
||||
v-model='cfg.value.value'
|
||||
prepend-icon='settings_applications'
|
||||
)
|
||||
v-divider
|
||||
v-subheader.pl-0 Sync Direction
|
||||
.body-1.ml-3 Choose how content synchronization is handled for this storage target.
|
||||
@@ -80,6 +96,9 @@ import targetsQuery from 'gql/admin/storage/storage-query-targets.gql'
|
||||
import targetsSaveMutation from 'gql/admin/storage/storage-mutation-save-targets.gql'
|
||||
|
||||
export default {
|
||||
filters: {
|
||||
startCase(val) { return _.startCase(val) }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
targets: []
|
||||
@@ -109,7 +128,7 @@ export default {
|
||||
'key',
|
||||
'config',
|
||||
'mode'
|
||||
]))
|
||||
])).map(str => ({...str, config: str.config.map(cfg => ({...cfg, value: cfg.value.value}))}))
|
||||
}
|
||||
})
|
||||
this.$store.commit('showNotification', {
|
||||
@@ -124,7 +143,7 @@ export default {
|
||||
targets: {
|
||||
query: targetsQuery,
|
||||
fetchPolicy: 'network-only',
|
||||
update: (data) => _.cloneDeep(data.storage.targets),
|
||||
update: (data) => _.cloneDeep(data.storage.targets).map(str => ({...str, config: str.config.map(cfg => ({...cfg, value: JSON.parse(cfg.value)}))})),
|
||||
watchLoading (isLoading) {
|
||||
this.$store.commit(`loading${isLoading ? 'Start' : 'Stop'}`, 'admin-storage-refresh')
|
||||
}
|
||||
|
@@ -17,17 +17,31 @@
|
||||
v-toolbar-title
|
||||
.subheading Authentication
|
||||
v-subheader Flush User Sessions
|
||||
v-card-text.pt-0
|
||||
v-card-text.pt-0.pl-4
|
||||
.body-1 This will cause all users to be logged out. You will need to log back in after the operation.
|
||||
v-btn(depressed).ml-0
|
||||
v-icon(left, color='grey') build
|
||||
span Proceed
|
||||
v-divider.my-0
|
||||
v-subheader Reset Guest User
|
||||
v-card-text.pt-0
|
||||
v-card-text.pt-0.pl-4
|
||||
.body-1 This will reset the guest user to its default parameters and permissions.
|
||||
v-btn(depressed).ml-0
|
||||
v-icon(left, color='grey') build
|
||||
span Proceed
|
||||
v-card.mt-3
|
||||
v-toolbar(:color='$vuetify.dark ? "" : "grey darken-3"', dark, dense, flat)
|
||||
v-toolbar-title
|
||||
.subheading Modules
|
||||
v-subheader Rescan Modules
|
||||
v-card-text.pt-0.pl-4
|
||||
.body-1 Look for new modules on disk. Existing configurations will be merged.
|
||||
v-btn(depressed).ml-0
|
||||
v-icon(left, color='grey') youtube_searched_for
|
||||
span Authentication
|
||||
v-btn(depressed).ml-0
|
||||
v-icon(left, color='grey') youtube_searched_for
|
||||
span Storage
|
||||
v-flex(xs12, sm6)
|
||||
v-card
|
||||
v-toolbar(:color='$vuetify.dark ? "" : "grey darken-3"', dark, dense, flat)
|
||||
|
Reference in New Issue
Block a user