diff options
Diffstat (limited to 'apps/settings/src/store/admin-security.js')
-rw-r--r-- | apps/settings/src/store/admin-security.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/apps/settings/src/store/admin-security.js b/apps/settings/src/store/admin-security.js new file mode 100644 index 00000000000..2cb5eb101ef --- /dev/null +++ b/apps/settings/src/store/admin-security.js @@ -0,0 +1,33 @@ +/** + * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +import Vue from 'vue' +import Vuex, { Store } from 'vuex' + +Vue.use(Vuex) + +const state = { + enforced: false, + enforcedGroups: [], + excludedGroups: [], +} + +const mutations = { + setEnforced(state, enabled) { + Vue.set(state, 'enforced', enabled) + }, + setEnforcedGroups(state, total) { + Vue.set(state, 'enforcedGroups', total) + }, + setExcludedGroups(state, used) { + Vue.set(state, 'excludedGroups', used) + }, +} + +export default new Store({ + strict: process.env.NODE_ENV !== 'production', + state, + mutations, +}) |