diff options
author | Sandeepa Singh <sandeepa.singh@ibm.com> | 2021-07-26 12:35:39 +0300 |
---|---|---|
committer | Derick Montague <derick.montague@ibm.com> | 2021-08-10 22:20:42 +0300 |
commit | b440616c23b61166ae6d87839a70eec31bdca235 (patch) | |
tree | d72769d4aa425e96e47419515b85a8631d8e99d7 /src/views | |
parent | f67f769f2304bca64d2b9758e22c21203960eef9 (diff) | |
download | webui-vue-b440616c23b61166ae6d87839a70eec31bdca235.tar.xz |
IA update: Update access and control section
This is the fifth commit of the information architecture changes and
has the following changes:
- The icon for access and control has been updated
- Access and control section has been updated to security and
access section
- Security settings page has been updated to policies page and moved to
security and access section
- Client sessions page has been updated to sessions page
- Local user management page has been updated to user management page
- SSL certificates page has been updated to certificates page
Signed-off-by: Sandeepa Singh <sandeepa.singh@ibm.com>
Change-Id: Ie93cee9002742ecf7d33615636f4f159f4395fc4
Diffstat (limited to 'src/views')
-rw-r--r-- | src/views/AccessControl/ClientSessions/index.js | 2 | ||||
-rw-r--r-- | src/views/AccessControl/LocalUserManagement/index.js | 2 | ||||
-rw-r--r-- | src/views/AccessControl/SslCertificates/index.js | 2 | ||||
-rw-r--r-- | src/views/ChangePassword/ChangePassword.vue | 2 | ||||
-rw-r--r-- | src/views/ProfileSettings/ProfileSettings.vue | 8 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/Certificates/Certificates.vue (renamed from src/views/AccessControl/SslCertificates/SslCertificates.vue) | 46 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/Certificates/CsrCountryCodes.js (renamed from src/views/AccessControl/SslCertificates/CsrCountryCodes.js) | 0 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue (renamed from src/views/AccessControl/SslCertificates/ModalGenerateCsr.vue) | 48 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/Certificates/ModalUploadCertificate.vue (renamed from src/views/AccessControl/SslCertificates/ModalUploadCertificate.vue) | 12 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/Certificates/index.js | 2 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/Ldap/Ldap.vue (renamed from src/views/AccessControl/Ldap/Ldap.vue) | 6 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/Ldap/ModalAddRoleGroup.vue (renamed from src/views/AccessControl/Ldap/ModalAddRoleGroup.vue) | 2 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/Ldap/TableRoleGroups.vue (renamed from src/views/AccessControl/Ldap/TableRoleGroups.vue) | 2 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/Ldap/index.js (renamed from src/views/AccessControl/Ldap/index.js) | 0 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/Policies/Policies.vue (renamed from src/views/Settings/SecuritySettings/SecuritySettings.vue) | 32 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/Policies/index.js | 2 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/Sessions/Sessions.vue (renamed from src/views/AccessControl/ClientSessions/ClientSessions.vue) | 65 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/Sessions/index.js | 2 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/UserManagement/ModalSettings.vue (renamed from src/views/AccessControl/LocalUserManagement/ModalSettings.vue) | 28 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/UserManagement/ModalUser.vue (renamed from src/views/AccessControl/LocalUserManagement/ModalUser.vue) | 71 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/UserManagement/TableRoles.vue (renamed from src/views/AccessControl/LocalUserManagement/TableRoles.vue) | 10 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/UserManagement/UserManagement.vue (renamed from src/views/AccessControl/LocalUserManagement/LocalUserManagement.vue) | 70 | ||||
-rw-r--r-- | src/views/SecurityAndAccess/UserManagement/index.js | 2 | ||||
-rw-r--r-- | src/views/Settings/SecuritySettings/index.js | 2 |
24 files changed, 198 insertions, 220 deletions
diff --git a/src/views/AccessControl/ClientSessions/index.js b/src/views/AccessControl/ClientSessions/index.js deleted file mode 100644 index 6000ab75..00000000 --- a/src/views/AccessControl/ClientSessions/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import ClientSessions from './ClientSessions.vue'; -export default ClientSessions; diff --git a/src/views/AccessControl/LocalUserManagement/index.js b/src/views/AccessControl/LocalUserManagement/index.js deleted file mode 100644 index 315748af..00000000 --- a/src/views/AccessControl/LocalUserManagement/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import LocalUserManagement from './LocalUserManagement.vue'; -export default LocalUserManagement; diff --git a/src/views/AccessControl/SslCertificates/index.js b/src/views/AccessControl/SslCertificates/index.js deleted file mode 100644 index 03daa565..00000000 --- a/src/views/AccessControl/SslCertificates/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import SslCertificates from './SslCertificates.vue'; -export default SslCertificates; diff --git a/src/views/ChangePassword/ChangePassword.vue b/src/views/ChangePassword/ChangePassword.vue index 039dd0b6..e4319303 100644 --- a/src/views/ChangePassword/ChangePassword.vue +++ b/src/views/ChangePassword/ChangePassword.vue @@ -115,7 +115,7 @@ export default { }; this.$store - .dispatch('localUsers/updateUser', data) + .dispatch('userManagement/updateUser', data) .then(() => this.$router.push('/')) .catch(() => (this.changePasswordError = true)); }, diff --git a/src/views/ProfileSettings/ProfileSettings.vue b/src/views/ProfileSettings/ProfileSettings.vue index 820d386c..35fc800d 100644 --- a/src/views/ProfileSettings/ProfileSettings.vue +++ b/src/views/ProfileSettings/ProfileSettings.vue @@ -30,7 +30,7 @@ > <b-form-text id="password-help-block"> {{ - $t('pageLocalUserManagement.modal.passwordMustBeBetween', { + $t('pageUserManagement.modal.passwordMustBeBetween', { min: passwordRequirements.minLength, max: passwordRequirements.maxLength, }) @@ -160,7 +160,7 @@ export default { return this.$store.getters['global/username']; }, passwordRequirements() { - return this.$store.getters['localUsers/accountPasswordRequirements']; + return this.$store.getters['userManagement/accountPasswordRequirements']; }, timezone() { return this.localOffset(); @@ -169,7 +169,7 @@ export default { created() { this.startLoader(); this.$store - .dispatch('localUsers/getAccountSettings') + .dispatch('userManagement/getAccountSettings') .finally(() => this.endLoader()); }, validations() { @@ -196,7 +196,7 @@ export default { }; this.$store - .dispatch('localUsers/updateUser', userData) + .dispatch('userManagement/updateUser', userData) .then((message) => { (this.form.newPassword = ''), (this.form.confirmPassword = ''); this.$v.$reset(); diff --git a/src/views/AccessControl/SslCertificates/SslCertificates.vue b/src/views/SecurityAndAccess/Certificates/Certificates.vue index 4ce9a707..9d208897 100644 --- a/src/views/AccessControl/SslCertificates/SslCertificates.vue +++ b/src/views/SecurityAndAccess/Certificates/Certificates.vue @@ -6,11 +6,11 @@ <!-- Expired certificates banner --> <alert :show="expiredCertificateTypes.length > 0" variant="danger"> <template v-if="expiredCertificateTypes.length > 1"> - {{ $t('pageSslCertificates.alert.certificatesExpiredMessage') }} + {{ $t('pageCertificates.alert.certificatesExpiredMessage') }} </template> <template v-else> {{ - $t('pageSslCertificates.alert.certificateExpiredMessage', { + $t('pageCertificates.alert.certificateExpiredMessage', { certificate: expiredCertificateTypes[0], }) }} @@ -19,11 +19,11 @@ <!-- Expiring certificates banner --> <alert :show="expiringCertificateTypes.length > 0" variant="warning"> <template v-if="expiringCertificateTypes.length > 1"> - {{ $t('pageSslCertificates.alert.certificatesExpiringMessage') }} + {{ $t('pageCertificates.alert.certificatesExpiringMessage') }} </template> <template v-else> {{ - $t('pageSslCertificates.alert.certificateExpiringMessage', { + $t('pageCertificates.alert.certificateExpiringMessage', { certificate: expiringCertificateTypes[0], }) }} @@ -35,11 +35,11 @@ <b-col xl="11" class="text-right"> <b-button v-b-modal.generate-csr - data-test-id="sslCertificates-button-generateCsr" + data-test-id="certificates-button-generateCsr" variant="link" > <icon-add /> - {{ $t('pageSslCertificates.generateCsr') }} + {{ $t('pageCertificates.generateCsr') }} </b-button> <b-button variant="primary" @@ -47,7 +47,7 @@ @click="initModalUploadCertificate(null)" > <icon-add /> - {{ $t('pageSslCertificates.addNewCertificate') }} + {{ $t('pageCertificates.addNewCertificate') }} </b-button> </b-col> </b-row> @@ -114,7 +114,7 @@ import BVToastMixin from '@/components/Mixins/BVToastMixin'; import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; export default { - name: 'SslCertificates', + name: 'Certificates', components: { Alert, IconAdd, @@ -137,23 +137,23 @@ export default { fields: [ { key: 'certificate', - label: this.$t('pageSslCertificates.table.certificate'), + label: this.$t('pageCertificates.table.certificate'), }, { key: 'issuedBy', - label: this.$t('pageSslCertificates.table.issuedBy'), + label: this.$t('pageCertificates.table.issuedBy'), }, { key: 'issuedTo', - label: this.$t('pageSslCertificates.table.issuedTo'), + label: this.$t('pageCertificates.table.issuedTo'), }, { key: 'validFrom', - label: this.$t('pageSslCertificates.table.validFrom'), + label: this.$t('pageCertificates.table.validFrom'), }, { key: 'validUntil', - label: this.$t('pageSslCertificates.table.validUntil'), + label: this.$t('pageCertificates.table.validUntil'), }, { key: 'actions', @@ -165,7 +165,7 @@ export default { }, computed: { certificates() { - return this.$store.getters['sslCertificates/allCertificates']; + return this.$store.getters['certificates/allCertificates']; }, tableItems() { return this.certificates.map((certificate) => { @@ -174,11 +174,11 @@ export default { actions: [ { value: 'replace', - title: this.$t('pageSslCertificates.replaceCertificate'), + title: this.$t('pageCertificates.replaceCertificate'), }, { value: 'delete', - title: this.$t('pageSslCertificates.deleteCertificate'), + title: this.$t('pageCertificates.deleteCertificate'), enabled: certificate.type === 'TrustStore Certificate' ? true : false, }, @@ -187,7 +187,7 @@ export default { }); }, certificatesForUpload() { - return this.$store.getters['sslCertificates/availableUploadTypes']; + return this.$store.getters['certificates/availableUploadTypes']; }, bmcTime() { return this.$store.getters['global/bmcTime']; @@ -215,7 +215,7 @@ export default { this.startLoader(); await this.$store.dispatch('global/getBmcTime'); this.$store - .dispatch('sslCertificates/getCertificates') + .dispatch('certificates/getCertificates') .finally(() => this.endLoader()); }, methods: { @@ -238,12 +238,12 @@ export default { initModalDeleteCertificate(certificate) { this.$bvModal .msgBoxConfirm( - this.$t('pageSslCertificates.modal.deleteConfirmMessage', { + this.$t('pageCertificates.modal.deleteConfirmMessage', { issuedBy: certificate.issuedBy, certificate: certificate.certificate, }), { - title: this.$t('pageSslCertificates.deleteCertificate'), + title: this.$t('pageCertificates.deleteCertificate'), okTitle: this.$t('global.action.delete'), cancelTitle: this.$t('global.action.cancel'), } @@ -264,7 +264,7 @@ export default { addNewCertificate(file, type) { this.startLoader(); this.$store - .dispatch('sslCertificates/addNewCertificate', { file, type }) + .dispatch('certificates/addNewCertificate', { file, type }) .then((success) => this.successToast(success)) .catch(({ message }) => this.errorToast(message)) .finally(() => this.endLoader()); @@ -276,7 +276,7 @@ export default { reader.onloadend = (event) => { const certificateString = event.target.result; this.$store - .dispatch('sslCertificates/replaceCertificate', { + .dispatch('certificates/replaceCertificate', { certificateString, type, location, @@ -289,7 +289,7 @@ export default { deleteCertificate({ type, location }) { this.startLoader(); this.$store - .dispatch('sslCertificates/deleteCertificate', { + .dispatch('certificates/deleteCertificate', { type, location, }) diff --git a/src/views/AccessControl/SslCertificates/CsrCountryCodes.js b/src/views/SecurityAndAccess/Certificates/CsrCountryCodes.js index a2d70007..a2d70007 100644 --- a/src/views/AccessControl/SslCertificates/CsrCountryCodes.js +++ b/src/views/SecurityAndAccess/Certificates/CsrCountryCodes.js diff --git a/src/views/AccessControl/SslCertificates/ModalGenerateCsr.vue b/src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue index 6544c2c4..d76f9fe1 100644 --- a/src/views/AccessControl/SslCertificates/ModalGenerateCsr.vue +++ b/src/views/SecurityAndAccess/Certificates/ModalGenerateCsr.vue @@ -5,9 +5,7 @@ ref="modal" size="lg" no-stacking - :title=" - $t('pageSslCertificates.modal.generateACertificateSigningRequest') - " + :title="$t('pageCertificates.modal.generateACertificateSigningRequest')" @ok="onOkGenerateCsrModal" @cancel="resetForm" @hidden="$v.$reset()" @@ -19,7 +17,7 @@ <b-row> <b-col lg="6"> <b-form-group - :label="$t('pageSslCertificates.modal.certificateType')" + :label="$t('pageCertificates.modal.certificateType')" label-for="certificate-type" > <b-form-select @@ -43,7 +41,7 @@ </b-col> <b-col lg="6"> <b-form-group - :label="$t('pageSslCertificates.modal.country')" + :label="$t('pageCertificates.modal.country')" label-for="country" > <b-form-select @@ -69,7 +67,7 @@ <b-row> <b-col lg="6"> <b-form-group - :label="$t('pageSslCertificates.modal.state')" + :label="$t('pageCertificates.modal.state')" label-for="state" > <b-form-input @@ -86,7 +84,7 @@ </b-col> <b-col lg="6"> <b-form-group - :label="$t('pageSslCertificates.modal.city')" + :label="$t('pageCertificates.modal.city')" label-for="city" > <b-form-input @@ -105,7 +103,7 @@ <b-row> <b-col lg="6"> <b-form-group - :label="$t('pageSslCertificates.modal.companyName')" + :label="$t('pageCertificates.modal.companyName')" label-for="company-name" > <b-form-input @@ -122,7 +120,7 @@ </b-col> <b-col lg="6"> <b-form-group - :label="$t('pageSslCertificates.modal.companyUnit')" + :label="$t('pageCertificates.modal.companyUnit')" label-for="company-unit" > <b-form-input @@ -141,7 +139,7 @@ <b-row> <b-col lg="6"> <b-form-group - :label="$t('pageSslCertificates.modal.commonName')" + :label="$t('pageCertificates.modal.commonName')" label-for="common-name" > <b-form-input @@ -159,7 +157,7 @@ <b-col lg="6"> <b-form-group label-for="challenge-password"> <template #label> - {{ $t('pageSslCertificates.modal.challengePassword') }} - + {{ $t('pageCertificates.modal.challengePassword') }} - <span class="form-text d-inline"> {{ $t('global.form.optional') }} </span> @@ -177,7 +175,7 @@ <b-col lg="6"> <b-form-group label-for="contact-person"> <template #label> - {{ $t('pageSslCertificates.modal.contactPerson') }} - + {{ $t('pageCertificates.modal.contactPerson') }} - <span class="form-text d-inline"> {{ $t('global.form.optional') }} </span> @@ -193,7 +191,7 @@ <b-col lg="6"> <b-form-group label-for="email-address"> <template #label> - {{ $t('pageSslCertificates.modal.emailAddress') }} - + {{ $t('pageCertificates.modal.emailAddress') }} - <span class="form-text d-inline"> {{ $t('global.form.optional') }} </span> @@ -211,15 +209,13 @@ <b-col lg="12"> <b-form-group label-for="alternate-name"> <template #label> - {{ $t('pageSslCertificates.modal.alternateName') }} - + {{ $t('pageCertificates.modal.alternateName') }} - <span class="form-text d-inline"> {{ $t('global.form.optional') }} </span> </template> <b-form-text id="alternate-name-help-block"> - {{ - $t('pageSslCertificates.modal.alternateNameHelperText') - }} + {{ $t('pageCertificates.modal.alternateNameHelperText') }} </b-form-text> <b-form-tags v-model="form.alternateName" @@ -232,7 +228,7 @@ 'aria-describedby': 'alternate-name-help-block', }" :duplicate-tag-text=" - $t('pageSslCertificates.modal.duplicateAlternateName') + $t('pageCertificates.modal.duplicateAlternateName') " placeholder="" data-test-id="modalGenerateCsr-input-alternateName" @@ -249,10 +245,10 @@ <b-row> <b-col lg="12"> <p class="col-form-label"> - {{ $t('pageSslCertificates.modal.privateKey') }} + {{ $t('pageCertificates.modal.privateKey') }} </p> <b-form-group - :label="$t('pageSslCertificates.modal.keyPairAlgorithm')" + :label="$t('pageCertificates.modal.keyPairAlgorithm')" label-for="key-pair-algorithm" > <b-form-select @@ -279,7 +275,7 @@ <b-col lg="12"> <template v-if="$v.form.keyPairAlgorithm.$model === 'EC'"> <b-form-group - :label="$t('pageSslCertificates.modal.keyCurveId')" + :label="$t('pageCertificates.modal.keyCurveId')" label-for="key-curve-id" > <b-form-select @@ -303,7 +299,7 @@ </template> <template v-if="$v.form.keyPairAlgorithm.$model === 'RSA'"> <b-form-group - :label="$t('pageSslCertificates.modal.keyBitLength')" + :label="$t('pageCertificates.modal.keyBitLength')" label-for="key-bit-length" > <b-form-select @@ -342,7 +338,7 @@ data-test-id="modalGenerateCsr-button-ok" @click="ok()" > - {{ $t('pageSslCertificates.generateCsr') }} + {{ $t('pageCertificates.generateCsr') }} </b-button> </template> </b-modal> @@ -350,7 +346,7 @@ id="csr-string" no-stacking size="lg" - :title="$t('pageSslCertificates.modal.certificateSigningRequest')" + :title="$t('pageCertificates.modal.certificateSigningRequest')" @hidden="onHiddenCsrStringModal" > {{ csrString }} @@ -383,7 +379,7 @@ import IconCheckmark from '@carbon/icons-vue/es/checkmark/20'; import { required, requiredIf } from 'vuelidate/lib/validators'; import { COUNTRY_LIST } from './CsrCountryCodes'; -import { CERTIFICATE_TYPES } from '@/store/modules/AccessControl/SslCertificatesStore'; +import { CERTIFICATE_TYPES } from '@/store/modules/SecurityAndAccess/CertificatesStore'; import BVToastMixin from '@/components/Mixins/BVToastMixin'; import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; @@ -459,7 +455,7 @@ export default { this.$v.$touch(); if (this.$v.$invalid) return; this.$store - .dispatch('sslCertificates/generateCsr', this.form) + .dispatch('certificates/generateCsr', this.form) .then(({ data: { CSRString } }) => { this.csrString = CSRString; this.$bvModal.show('csr-string'); diff --git a/src/views/AccessControl/SslCertificates/ModalUploadCertificate.vue b/src/views/SecurityAndAccess/Certificates/ModalUploadCertificate.vue index cafbd935..f4db7a26 100644 --- a/src/views/AccessControl/SslCertificates/ModalUploadCertificate.vue +++ b/src/views/SecurityAndAccess/Certificates/ModalUploadCertificate.vue @@ -2,17 +2,17 @@ <b-modal id="upload-certificate" ref="modal" @ok="onOk" @hidden="resetForm"> <template #modal-title> <template v-if="certificate"> - {{ $t('pageSslCertificates.replaceCertificate') }} + {{ $t('pageCertificates.replaceCertificate') }} </template> <template v-else> - {{ $t('pageSslCertificates.addNewCertificate') }} + {{ $t('pageCertificates.addNewCertificate') }} </template> </template> <b-form> <!-- Replace Certificate type --> <template v-if="certificate !== null"> <dl class="mb-4"> - <dt>{{ $t('pageSslCertificates.modal.certificateType') }}</dt> + <dt>{{ $t('pageCertificates.modal.certificateType') }}</dt> <dd>{{ certificate.certificate }}</dd> </dl> </template> @@ -20,7 +20,7 @@ <!-- Add new Certificate type --> <template v-else> <b-form-group - :label="$t('pageSslCertificates.modal.certificateType')" + :label="$t('pageCertificates.modal.certificateType')" label-for="certificate-type" > <b-form-select @@ -39,7 +39,7 @@ </b-form-group> </template> - <b-form-group :label="$t('pageSslCertificates.modal.certificateFile')"> + <b-form-group :label="$t('pageCertificates.modal.certificateFile')"> <form-file id="certificate-file" v-model="form.file" @@ -100,7 +100,7 @@ export default { }, computed: { certificateTypes() { - return this.$store.getters['sslCertificates/availableUploadTypes']; + return this.$store.getters['certificates/availableUploadTypes']; }, certificateOptions() { return this.certificateTypes.map(({ type, label }) => { diff --git a/src/views/SecurityAndAccess/Certificates/index.js b/src/views/SecurityAndAccess/Certificates/index.js new file mode 100644 index 00000000..aff57b59 --- /dev/null +++ b/src/views/SecurityAndAccess/Certificates/index.js @@ -0,0 +1,2 @@ +import Certificates from './Certificates.vue'; +export default Certificates; diff --git a/src/views/AccessControl/Ldap/Ldap.vue b/src/views/SecurityAndAccess/Ldap/Ldap.vue index 78bb830b..1f2108de 100644 --- a/src/views/AccessControl/Ldap/Ldap.vue +++ b/src/views/SecurityAndAccess/Ldap/Ldap.vue @@ -63,7 +63,7 @@ </dl> <b-link class="d-inline-block mb-4 m-md-0" - to="/access-control/ssl-certificates" + to="/security-and-access/certificates" > {{ $t('pageLdap.form.manageSslCertificates') }} </b-link> @@ -283,7 +283,7 @@ export default { 'activeDirectory', ]), sslCertificates() { - return this.$store.getters['sslCertificates/allCertificates']; + return this.$store.getters['certificates/allCertificates']; }, caCertificateExpiration() { const caCertificate = find(this.sslCertificates, { @@ -351,7 +351,7 @@ export default { .dispatch('ldap/getAccountSettings') .finally(() => this.endLoader()); this.$store - .dispatch('sslCertificates/getCertificates') + .dispatch('certificates/getCertificates') .finally(() => this.endLoader()); this.setFormValues(); }, diff --git a/src/views/AccessControl/Ldap/ModalAddRoleGroup.vue b/src/views/SecurityAndAccess/Ldap/ModalAddRoleGroup.vue index b6b77e9e..6ea2561a 100644 --- a/src/views/AccessControl/Ldap/ModalAddRoleGroup.vue +++ b/src/views/SecurityAndAccess/Ldap/ModalAddRoleGroup.vue @@ -108,7 +108,7 @@ export default { }, computed: { accountRoles() { - return this.$store.getters['localUsers/accountRoles']; + return this.$store.getters['userManagement/accountRoles']; }, }, watch: { diff --git a/src/views/AccessControl/Ldap/TableRoleGroups.vue b/src/views/SecurityAndAccess/Ldap/TableRoleGroups.vue index 9d05ceaf..6e231110 100644 --- a/src/views/AccessControl/Ldap/TableRoleGroups.vue +++ b/src/views/SecurityAndAccess/Ldap/TableRoleGroups.vue @@ -179,7 +179,7 @@ export default { }, }, created() { - this.$store.dispatch('localUsers/getAccountRoles'); + this.$store.dispatch('userManagement/getAccountRoles'); }, methods: { onBatchAction() { diff --git a/src/views/AccessControl/Ldap/index.js b/src/views/SecurityAndAccess/Ldap/index.js index 6ae3abfc..6ae3abfc 100644 --- a/src/views/AccessControl/Ldap/index.js +++ b/src/views/SecurityAndAccess/Ldap/index.js diff --git a/src/views/Settings/SecuritySettings/SecuritySettings.vue b/src/views/SecurityAndAccess/Policies/Policies.vue index ec8d2589..41b95366 100644 --- a/src/views/Settings/SecuritySettings/SecuritySettings.vue +++ b/src/views/SecurityAndAccess/Policies/Policies.vue @@ -3,26 +3,24 @@ <page-title /> <b-row> <b-col md="8"> - <page-section - :section-title="$t('pageSecuritySettings.networkServices')" - > + <page-section :section-title="$t('pagePolicies.networkServices')"> <b-row class="setting-section"> <b-col class="d-flex align-items-center justify-content-between"> <dl class="mr-3 w-75"> - <dt>{{ $t('pageSecuritySettings.ssh') }}</dt> + <dt>{{ $t('pagePolicies.ssh') }}</dt> <dd> - {{ $t('pageSecuritySettings.sshDescription') }} + {{ $t('pagePolicies.sshDescription') }} </dd> </dl> <b-form-checkbox id="sshSwitch" v-model="sshProtocolState" - data-test-id="security-toggle-bmcShell" + data-test-id="policies-toggle-bmcShell" switch @change="changeSshProtocolState" > <span class="sr-only"> - {{ $t('pageSecuritySettings.ssh') }} + {{ $t('pagePolicies.ssh') }} </span> <span v-if="sshProtocolState"> {{ $t('global.status.enabled') }} @@ -34,20 +32,20 @@ <b-row class="setting-section"> <b-col class="d-flex align-items-center justify-content-between"> <dl class="mt-3 mr-3 w-75"> - <dt>{{ $t('pageSecuritySettings.ipmi') }}</dt> + <dt>{{ $t('pagePolicies.ipmi') }}</dt> <dd> - {{ $t('pageSecuritySettings.ipmiDescription') }} + {{ $t('pagePolicies.ipmiDescription') }} </dd> </dl> <b-form-checkbox id="ipmiSwitch" v-model="ipmiProtocolState" - data-test-id="security-toggle-networkIpmi" + data-test-id="polices-toggle-networkIpmi" switch @change="changeIpmiProtocolState" > <span class="sr-only"> - {{ $t('pageSecuritySettings.ipmi') }} + {{ $t('pagePolicies.ipmi') }} </span> <span v-if="ipmiProtocolState"> {{ $t('global.status.enabled') }} @@ -70,7 +68,7 @@ import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; import BVToastMixin from '@/components/Mixins/BVToastMixin'; export default { - name: 'SecuritySettings', + name: 'Policies', components: { PageTitle, PageSection }, mixins: [LoadingBarMixin, BVToastMixin], beforeRouteLeave(to, from, next) { @@ -80,7 +78,7 @@ export default { computed: { sshProtocolState: { get() { - return this.$store.getters['securitySettings/sshProtocolEnabled']; + return this.$store.getters['policies/sshProtocolEnabled']; }, set(newValue) { return newValue; @@ -88,7 +86,7 @@ export default { }, ipmiProtocolState: { get() { - return this.$store.getters['securitySettings/ipmiProtocolEnabled']; + return this.$store.getters['policies/ipmiProtocolEnabled']; }, set(newValue) { return newValue; @@ -98,19 +96,19 @@ export default { created() { this.startLoader(); this.$store - .dispatch('securitySettings/getNetworkProtocolStatus') + .dispatch('policies/getNetworkProtocolStatus') .finally(() => this.endLoader()); }, methods: { changeIpmiProtocolState(state) { this.$store - .dispatch('securitySettings/saveIpmiProtocolState', state) + .dispatch('policies/saveIpmiProtocolState', state) .then((message) => this.successToast(message)) .catch(({ message }) => this.errorToast(message)); }, changeSshProtocolState(state) { this.$store - .dispatch('securitySettings/saveSshProtocolState', state) + .dispatch('policies/saveSshProtocolState', state) .then((message) => this.successToast(message)) .catch(({ message }) => this.errorToast(message)); }, diff --git a/src/views/SecurityAndAccess/Policies/index.js b/src/views/SecurityAndAccess/Policies/index.js new file mode 100644 index 00000000..77023908 --- /dev/null +++ b/src/views/SecurityAndAccess/Policies/index.js @@ -0,0 +1,2 @@ +import Policies from './Policies.vue'; +export default Policies; diff --git a/src/views/AccessControl/ClientSessions/ClientSessions.vue b/src/views/SecurityAndAccess/Sessions/Sessions.vue index b61b2032..bd4c06a9 100644 --- a/src/views/AccessControl/ClientSessions/ClientSessions.vue +++ b/src/views/SecurityAndAccess/Sessions/Sessions.vue @@ -4,8 +4,8 @@ <b-row class="align-items-end"> <b-col sm="6" md="5" xl="4"> <search - :placeholder="$t('pageClientSessions.table.searchSessions')" - data-test-id="clientSessions-input-searchSessions" + :placeholder="$t('pageSessions.table.searchSessions')" + data-test-id="sessions-input-searchSessions" @change-search="onChangeSearchInput" @clear-search="onClearSearchInput" /> @@ -49,7 +49,7 @@ <template #head(checkbox)> <b-form-checkbox v-model="tableHeaderCheckboxModel" - data-test-id="clientSessions-checkbox-selectAll" + data-test-id="sessions-checkbox-selectAll" :indeterminate="tableHeaderCheckboxIndeterminate" @change="onChangeHeaderCheckbox($refs.table)" > @@ -59,7 +59,7 @@ <template #cell(checkbox)="row"> <b-form-checkbox v-model="row.rowSelected" - :data-test-id="`clientSessions-checkbox-selectRow-${row.index}`" + :data-test-id="`sessions-checkbox-selectRow-${row.index}`" @change="toggleSelectRow($refs.table, row.index)" > <span class="sr-only">{{ $t('global.table.selectItem') }}</span> @@ -75,7 +75,7 @@ :title="action.title" :row-data="row.item" :btn-icon-only="false" - :data-test-id="`clientSessions-button-disconnect-${row.index}`" + :data-test-id="`sessions-button-disconnect-${row.index}`" @click-table-action="onTableRowAction($event, row.item)" ></table-row-action> </template> @@ -164,15 +164,15 @@ export default { }, { key: 'clientID', - label: this.$t('pageClientSessions.table.clientID'), + label: this.$t('pageSessions.table.clientID'), }, { key: 'username', - label: this.$t('pageClientSessions.table.username'), + label: this.$t('pageSessions.table.username'), }, { key: 'ipAddress', - label: this.$t('pageClientSessions.table.ipAddress'), + label: this.$t('pageSessions.table.ipAddress'), }, { key: 'actions', @@ -182,7 +182,7 @@ export default { batchActions: [ { value: 'disconnect', - label: this.$t('pageClientSessions.action.disconnect'), + label: this.$t('pageSessions.action.disconnect'), }, ], currentPage: currentPage, @@ -202,25 +202,23 @@ export default { : this.allConnections.length; }, allConnections() { - return this.$store.getters['clientSessions/allConnections'].map( - (session) => { - return { - ...session, - actions: [ - { - value: 'disconnect', - title: this.$t('pageClientSessions.action.disconnect'), - }, - ], - }; - } - ); + return this.$store.getters['sessions/allConnections'].map((session) => { + return { + ...session, + actions: [ + { + value: 'disconnect', + title: this.$t('pageSessions.action.disconnect'), + }, + ], + }; + }); }, }, created() { this.startLoader(); this.$store - .dispatch('clientSessions/getClientSessionsData') + .dispatch('sessions/getSessionsData') .finally(() => this.endLoader()); }, methods: { @@ -232,7 +230,7 @@ export default { }, disconnectSessions(uris) { this.$store - .dispatch('clientSessions/disconnectSessions', uris) + .dispatch('sessions/disconnectSessions', uris) .then((messages) => { messages.forEach(({ type, message }) => { if (type === 'success') { @@ -246,14 +244,11 @@ export default { onTableRowAction(action, { uri }) { if (action === 'disconnect') { this.$bvModal - .msgBoxConfirm( - this.$tc('pageClientSessions.modal.disconnectMessage'), - { - title: this.$tc('pageClientSessions.modal.disconnectTitle'), - okTitle: this.$t('pageClientSessions.action.disconnect'), - cancelTitle: this.$t('global.action.cancel'), - } - ) + .msgBoxConfirm(this.$tc('pageSessions.modal.disconnectMessage'), { + title: this.$tc('pageSessions.modal.disconnectTitle'), + okTitle: this.$t('pageSessions.action.disconnect'), + cancelTitle: this.$t('global.action.cancel'), + }) .then((deleteConfirmed) => { if (deleteConfirmed) this.disconnectSessions([uri]); }); @@ -265,15 +260,15 @@ export default { this.$bvModal .msgBoxConfirm( this.$tc( - 'pageClientSessions.modal.disconnectMessage', + 'pageSessions.modal.disconnectMessage', this.selectedRows.length ), { title: this.$tc( - 'pageClientSessions.modal.disconnectTitle', + 'pageSessions.modal.disconnectTitle', this.selectedRows.length ), - okTitle: this.$t('pageClientSessions.action.disconnect'), + okTitle: this.$t('pageSessions.action.disconnect'), cancelTitle: this.$t('global.action.cancel'), } ) diff --git a/src/views/SecurityAndAccess/Sessions/index.js b/src/views/SecurityAndAccess/Sessions/index.js new file mode 100644 index 00000000..aa113aff --- /dev/null +++ b/src/views/SecurityAndAccess/Sessions/index.js @@ -0,0 +1,2 @@ +import Sessions from './Sessions.vue'; +export default Sessions; diff --git a/src/views/AccessControl/LocalUserManagement/ModalSettings.vue b/src/views/SecurityAndAccess/UserManagement/ModalSettings.vue index bf274e5a..0f05123c 100644 --- a/src/views/AccessControl/LocalUserManagement/ModalSettings.vue +++ b/src/views/SecurityAndAccess/UserManagement/ModalSettings.vue @@ -2,7 +2,7 @@ <b-modal id="modal-settings" ref="modal" - :title="$t('pageLocalUserManagement.accountPolicySettings')" + :title="$t('pageUserManagement.accountPolicySettings')" @hidden="resetForm" > <b-form id="form-settings" novalidate @submit.prevent="handleSubmit"> @@ -10,9 +10,7 @@ <b-row> <b-col> <b-form-group - :label=" - $t('pageLocalUserManagement.modal.maxFailedLoginAttempts') - " + :label="$t('pageUserManagement.modal.maxFailedLoginAttempts')" label-for="lockout-threshold" > <b-form-text id="lockout-threshold-help-block"> @@ -28,7 +26,7 @@ v-model.number="form.lockoutThreshold" type="number" aria-describedby="lockout-threshold-help-block" - data-test-id="localUserManagement-input-lockoutThreshold" + data-test-id="userManagement-input-lockoutThreshold" :state="getValidationState($v.form.lockoutThreshold)" @input="$v.form.lockoutThreshold.$touch()" /> @@ -54,38 +52,36 @@ </b-col> <b-col> <b-form-group - :label="$t('pageLocalUserManagement.modal.userUnlockMethod')" + :label="$t('pageUserManagement.modal.userUnlockMethod')" > <b-form-radio v-model="form.unlockMethod" name="unlock-method" class="mb-2" :value="0" - data-test-id="localUserManagement-radio-manualUnlock" + data-test-id="userManagement-radio-manualUnlock" @input="$v.form.unlockMethod.$touch()" > - {{ $t('pageLocalUserManagement.modal.manual') }} + {{ $t('pageUserManagement.modal.manual') }} </b-form-radio> <b-form-radio v-model="form.unlockMethod" name="unlock-method" :value="1" - data-test-id="localUserManagement-radio-automaticUnlock" + data-test-id="userManagement-radio-automaticUnlock" @input="$v.form.unlockMethod.$touch()" > - {{ $t('pageLocalUserManagement.modal.automaticAfterTimeout') }} + {{ $t('pageUserManagement.modal.automaticAfterTimeout') }} </b-form-radio> <div class="mt-3 ml-4"> <b-form-text id="lockout-duration-help-block"> - {{ - $t('pageLocalUserManagement.modal.timeoutDurationSeconds') - }} + {{ $t('pageUserManagement.modal.timeoutDurationSeconds') }} </b-form-text> <b-form-input v-model.number="form.lockoutDuration" aria-describedby="lockout-duration-help-block" type="number" - data-test-id="localUserManagement-input-lockoutDuration" + data-test-id="userManagement-input-lockoutDuration" :state="getValidationState($v.form.lockoutDuration)" :readonly="$v.form.unlockMethod.$model === 0" @input="$v.form.lockoutDuration.$touch()" @@ -107,7 +103,7 @@ <template #modal-footer="{ cancel }"> <b-button variant="secondary" - data-test-id="localUserManagement-button-cancel" + data-test-id="userManagement-button-cancel" @click="cancel()" > {{ $t('global.action.cancel') }} @@ -116,7 +112,7 @@ form="form-settings" type="submit" variant="primary" - data-test-id="localUserManagement-button-submit" + data-test-id="userManagement-button-submit" @click="onOk" > {{ $t('global.action.save') }} diff --git a/src/views/AccessControl/LocalUserManagement/ModalUser.vue b/src/views/SecurityAndAccess/UserManagement/ModalUser.vue index 202ae8e6..0f8757ce 100644 --- a/src/views/AccessControl/LocalUserManagement/ModalUser.vue +++ b/src/views/SecurityAndAccess/UserManagement/ModalUser.vue @@ -2,10 +2,10 @@ <b-modal id="modal-user" ref="modal" @hidden="resetForm"> <template #modal-title> <template v-if="newUser"> - {{ $t('pageLocalUserManagement.addUser') }} + {{ $t('pageUserManagement.addUser') }} </template> <template v-else> - {{ $t('pageLocalUserManagement.editUser') }} + {{ $t('pageUserManagement.editUser') }} </template> </template> <b-form id="form-user" novalidate @submit.prevent="handleSubmit"> @@ -15,42 +15,38 @@ <b-col sm="9"> <alert :show="true" variant="warning" small> <template v-if="!$v.form.manualUnlock.$dirty"> - {{ $t('pageLocalUserManagement.modal.accountLocked') }} + {{ $t('pageUserManagement.modal.accountLocked') }} </template> <template v-else> - {{ - $t('pageLocalUserManagement.modal.clickSaveToUnlockAccount') - }} + {{ $t('pageUserManagement.modal.clickSaveToUnlockAccount') }} </template> </alert> </b-col> <b-col sm="3"> <input v-model="form.manualUnlock" - data-test-id="localUserManagement-input-manualUnlock" + data-test-id="userManagement-input-manualUnlock" type="hidden" value="false" /> <b-button variant="primary" :disabled="$v.form.manualUnlock.$dirty" - data-test-id="localUserManagement-button-manualUnlock" + data-test-id="userManagement-button-manualUnlock" @click="$v.form.manualUnlock.$touch()" > - {{ $t('pageLocalUserManagement.modal.unlock') }} + {{ $t('pageUserManagement.modal.unlock') }} </b-button> </b-col> </b-row> <b-row> <b-col> - <b-form-group - :label="$t('pageLocalUserManagement.modal.accountStatus')" - > + <b-form-group :label="$t('pageUserManagement.modal.accountStatus')"> <b-form-radio v-model="form.status" name="user-status" :value="true" - data-test-id="localUserManagement-radioButton-statusEnabled" + data-test-id="userManagement-radioButton-statusEnabled" @input="$v.form.status.$touch()" > {{ $t('global.status.enabled') }} @@ -58,7 +54,7 @@ <b-form-radio v-model="form.status" name="user-status" - data-test-id="localUserManagement-radioButton-statusDisabled" + data-test-id="userManagement-radioButton-statusDisabled" :value="false" @input="$v.form.status.$touch()" > @@ -66,15 +62,15 @@ </b-form-radio> </b-form-group> <b-form-group - :label="$t('pageLocalUserManagement.modal.username')" + :label="$t('pageUserManagement.modal.username')" label-for="username" > <b-form-text id="username-help-block"> - {{ $t('pageLocalUserManagement.modal.cannotStartWithANumber') }} + {{ $t('pageUserManagement.modal.cannotStartWithANumber') }} <br /> {{ $t( - 'pageLocalUserManagement.modal.noSpecialCharactersExceptUnderscore' + 'pageUserManagement.modal.noSpecialCharactersExceptUnderscore' ) }} </b-form-text> @@ -83,7 +79,7 @@ v-model="form.username" type="text" aria-describedby="username-help-block" - data-test-id="localUserManagement-input-username" + data-test-id="userManagement-input-username" :state="getValidationState($v.form.username)" :disabled="!newUser && originalUsername === 'root'" @input="$v.form.username.$touch()" @@ -103,14 +99,14 @@ </b-form-invalid-feedback> </b-form-group> <b-form-group - :label="$t('pageLocalUserManagement.modal.privilege')" + :label="$t('pageUserManagement.modal.privilege')" label-for="privilege" > <b-form-select id="privilege" v-model="form.privilege" :options="privilegeTypes" - data-test-id="localUserManagement-select-privilege" + data-test-id="userManagement-select-privilege" :state="getValidationState($v.form.privilege)" @input="$v.form.privilege.$touch()" > @@ -129,12 +125,12 @@ </b-col> <b-col> <b-form-group - :label="$t('pageLocalUserManagement.modal.userPassword')" + :label="$t('pageUserManagement.modal.userPassword')" label-for="password" > <b-form-text id="password-help-block"> {{ - $t('pageLocalUserManagement.modal.passwordMustBeBetween', { + $t('pageUserManagement.modal.passwordMustBeBetween', { min: passwordRequirements.minLength, max: passwordRequirements.maxLength, }) @@ -145,7 +141,7 @@ id="password" v-model="form.password" type="password" - data-test-id="localUserManagement-input-password" + data-test-id="userManagement-input-password" aria-describedby="password-help-block" :state="getValidationState($v.form.password)" class="form-control-with-button" @@ -161,27 +157,24 @@ " > {{ - $t( - 'pageLocalUserManagement.modal.passwordMustBeBetween', - { - min: passwordRequirements.minLength, - max: passwordRequirements.maxLength, - } - ) + $t('pageUserManagement.modal.passwordMustBeBetween', { + min: passwordRequirements.minLength, + max: passwordRequirements.maxLength, + }) }} </template> </b-form-invalid-feedback> </input-password-toggle> </b-form-group> <b-form-group - :label="$t('pageLocalUserManagement.modal.confirmUserPassword')" + :label="$t('pageUserManagement.modal.confirmUserPassword')" label-for="password-confirmation" > <input-password-toggle> <b-form-input id="password-confirmation" v-model="form.passwordConfirmation" - data-test-id="localUserManagement-input-passwordConfirmation" + data-test-id="userManagement-input-passwordConfirmation" type="password" :state="getValidationState($v.form.passwordConfirmation)" class="form-control-with-button" @@ -194,9 +187,7 @@ <template v-else-if="!$v.form.passwordConfirmation.sameAsPassword" > - {{ - $t('pageLocalUserManagement.modal.passwordsDoNotMatch') - }} + {{ $t('pageUserManagement.modal.passwordsDoNotMatch') }} </template> </b-form-invalid-feedback> </input-password-toggle> @@ -208,20 +199,20 @@ <template #modal-footer="{ cancel }"> <b-button variant="secondary" - data-test-id="localUserManagement-button-cancel" + data-test-id="userManagement-button-cancel" @click="cancel()" > {{ $t('global.action.cancel') }} </b-button> <b-button form="form-user" - data-test-id="localUserManagement-button-submit" + data-test-id="userManagement-button-submit" type="submit" variant="primary" @click="onOk" > <template v-if="newUser"> - {{ $t('pageLocalUserManagement.addUser') }} + {{ $t('pageUserManagement.addUser') }} </template> <template v-else> {{ $t('global.action.save') }} @@ -275,13 +266,13 @@ export default { return this.user ? false : true; }, accountSettings() { - return this.$store.getters['localUsers/accountSettings']; + return this.$store.getters['userManagement/accountSettings']; }, manualUnlockPolicy() { return !this.accountSettings.accountLockoutDuration; }, privilegeTypes() { - return this.$store.getters['localUsers/accountRoles']; + return this.$store.getters['userManagement/accountRoles']; }, }, watch: { diff --git a/src/views/AccessControl/LocalUserManagement/TableRoles.vue b/src/views/SecurityAndAccess/UserManagement/TableRoles.vue index 3993af02..61ef1ee8 100644 --- a/src/views/AccessControl/LocalUserManagement/TableRoles.vue +++ b/src/views/SecurityAndAccess/UserManagement/TableRoles.vue @@ -35,7 +35,7 @@ export default { items: [ { description: this.$t( - 'pageLocalUserManagement.tableRoles.configureComponentsManagedByThisService' + 'pageUserManagement.tableRoles.configureComponentsManagedByThisService' ), administrator: true, operator: true, @@ -44,7 +44,7 @@ export default { }, { description: this.$t( - 'pageLocalUserManagement.tableRoles.configureManagerResources' + 'pageUserManagement.tableRoles.configureManagerResources' ), administrator: true, operator: false, @@ -53,7 +53,7 @@ export default { }, { description: this.$t( - 'pageLocalUserManagement.tableRoles.updatePasswordForCurrentUserAccount' + 'pageUserManagement.tableRoles.updatePasswordForCurrentUserAccount' ), administrator: true, operator: true, @@ -62,7 +62,7 @@ export default { }, { description: this.$t( - 'pageLocalUserManagement.tableRoles.configureUsersAndTheirAccounts' + 'pageUserManagement.tableRoles.configureUsersAndTheirAccounts' ), administrator: true, operator: false, @@ -71,7 +71,7 @@ export default { }, { description: this.$t( - 'pageLocalUserManagement.tableRoles.logInToTheServiceAndReadResources' + 'pageUserManagement.tableRoles.logInToTheServiceAndReadResources' ), administrator: true, operator: true, diff --git a/src/views/AccessControl/LocalUserManagement/LocalUserManagement.vue b/src/views/SecurityAndAccess/UserManagement/UserManagement.vue index fb5ba16e..015fee91 100644 --- a/src/views/AccessControl/LocalUserManagement/LocalUserManagement.vue +++ b/src/views/SecurityAndAccess/UserManagement/UserManagement.vue @@ -5,15 +5,15 @@ <b-col xl="9" class="text-right"> <b-button variant="link" @click="initModalSettings"> <icon-settings /> - {{ $t('pageLocalUserManagement.accountPolicySettings') }} + {{ $t('pageUserManagement.accountPolicySettings') }} </b-button> <b-button variant="primary" - data-test-id="localUserManagement-button-addUser" + data-test-id="userManagement-button-addUser" @click="initModalUser(null)" > <icon-add /> - {{ $t('pageLocalUserManagement.addUser') }} + {{ $t('pageUserManagement.addUser') }} </b-button> </b-col> </b-row> @@ -42,7 +42,7 @@ <template #head(checkbox)> <b-form-checkbox v-model="tableHeaderCheckboxModel" - data-test-id="localUserManagement-checkbox-tableHeaderCheckbox" + data-test-id="userManagement-checkbox-tableHeaderCheckbox" :indeterminate="tableHeaderCheckboxIndeterminate" @change="onChangeHeaderCheckbox($refs.table)" > @@ -52,7 +52,7 @@ <template #cell(checkbox)="row"> <b-form-checkbox v-model="row.rowSelected" - data-test-id="localUserManagement-checkbox-toggleSelectRow" + data-test-id="userManagement-checkbox-toggleSelectRow" @change="toggleSelectRow($refs.table, row.index)" > <span class="sr-only">{{ $t('global.table.selectItem') }}</span> @@ -72,11 +72,11 @@ <template #icon> <icon-edit v-if="action.value === 'edit'" - :data-test-id="`localUserManagement-tableRowAction-edit-${index}`" + :data-test-id="`userManagement-tableRowAction-edit-${index}`" /> <icon-trashcan v-if="action.value === 'delete'" - :data-test-id="`localUserManagement-tableRowAction-delete-${index}`" + :data-test-id="`userManagement-tableRowAction-delete-${index}`" /> </template> </table-row-action> @@ -88,12 +88,12 @@ <b-col xl="8"> <b-button v-b-toggle.collapse-role-table - data-test-id="localUserManagement-button-viewPrivilegeRoleDescriptions" + data-test-id="userManagement-button-viewPrivilegeRoleDescriptions" variant="link" class="mt-3" > <icon-chevron /> - {{ $t('pageLocalUserManagement.viewPrivilegeRoleDescriptions') }} + {{ $t('pageUserManagement.viewPrivilegeRoleDescriptions') }} </b-button> <b-collapse id="collapse-role-table" class="mt-3"> <table-roles /> @@ -134,7 +134,7 @@ import BVToastMixin from '@/components/Mixins/BVToastMixin'; import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; export default { - name: 'LocalUsers', + name: 'UserManagement', components: { IconAdd, IconChevron, @@ -162,15 +162,15 @@ export default { }, { key: 'username', - label: this.$t('pageLocalUserManagement.table.username'), + label: this.$t('pageUserManagement.table.username'), }, { key: 'privilege', - label: this.$t('pageLocalUserManagement.table.privilege'), + label: this.$t('pageUserManagement.table.privilege'), }, { key: 'status', - label: this.$t('pageLocalUserManagement.table.status'), + label: this.$t('pageUserManagement.table.status'), }, { key: 'actions', @@ -199,7 +199,7 @@ export default { }, computed: { allUsers() { - return this.$store.getters['localUsers/allUsers']; + return this.$store.getters['userManagement/allUsers']; }, tableItems() { // transform user data to table data @@ -216,12 +216,12 @@ export default { { value: 'edit', enabled: true, - title: this.$t('pageLocalUserManagement.editUser'), + title: this.$t('pageUserManagement.editUser'), }, { value: 'delete', enabled: user.UserName === 'root' ? false : true, - title: this.$tc('pageLocalUserManagement.deleteUser'), + title: this.$tc('pageUserManagement.deleteUser'), }, ], ...user, @@ -229,17 +229,19 @@ export default { }); }, settings() { - return this.$store.getters['localUsers/accountSettings']; + return this.$store.getters['userManagement/accountSettings']; }, passwordRequirements() { - return this.$store.getters['localUsers/accountPasswordRequirements']; + return this.$store.getters['userManagement/accountPasswordRequirements']; }, }, created() { this.startLoader(); - this.$store.dispatch('localUsers/getUsers').finally(() => this.endLoader()); - this.$store.dispatch('localUsers/getAccountSettings'); - this.$store.dispatch('localUsers/getAccountRoles'); + this.$store + .dispatch('userManagement/getUsers') + .finally(() => this.endLoader()); + this.$store.dispatch('userManagement/getAccountSettings'); + this.$store.dispatch('userManagement/getAccountRoles'); }, methods: { initModalUser(user) { @@ -249,12 +251,12 @@ export default { initModalDelete(user) { this.$bvModal .msgBoxConfirm( - this.$t('pageLocalUserManagement.modal.deleteConfirmMessage', { + this.$t('pageUserManagement.modal.deleteConfirmMessage', { user: user.username, }), { - title: this.$tc('pageLocalUserManagement.deleteUser'), - okTitle: this.$tc('pageLocalUserManagement.deleteUser'), + title: this.$tc('pageUserManagement.deleteUser'), + okTitle: this.$tc('pageUserManagement.deleteUser'), cancelTitle: this.$t('global.action.cancel'), } ) @@ -271,13 +273,13 @@ export default { this.startLoader(); if (isNewUser) { this.$store - .dispatch('localUsers/createUser', userData) + .dispatch('userManagement/createUser', userData) .then((success) => this.successToast(success)) .catch(({ message }) => this.errorToast(message)) .finally(() => this.endLoader()); } else { this.$store - .dispatch('localUsers/updateUser', userData) + .dispatch('userManagement/updateUser', userData) .then((success) => this.successToast(success)) .catch(({ message }) => this.errorToast(message)) .finally(() => this.endLoader()); @@ -286,7 +288,7 @@ export default { deleteUser({ username }) { this.startLoader(); this.$store - .dispatch('localUsers/deleteUser', username) + .dispatch('userManagement/deleteUser', username) .then((success) => this.successToast(success)) .catch(({ message }) => this.errorToast(message)) .finally(() => this.endLoader()); @@ -297,16 +299,16 @@ export default { this.$bvModal .msgBoxConfirm( this.$tc( - 'pageLocalUserManagement.modal.batchDeleteConfirmMessage', + 'pageUserManagement.modal.batchDeleteConfirmMessage', this.selectedRows.length ), { title: this.$tc( - 'pageLocalUserManagement.deleteUser', + 'pageUserManagement.deleteUser', this.selectedRows.length ), okTitle: this.$tc( - 'pageLocalUserManagement.deleteUser', + 'pageUserManagement.deleteUser', this.selectedRows.length ), cancelTitle: this.$t('global.action.cancel'), @@ -316,7 +318,7 @@ export default { if (deleteConfirmed) { this.startLoader(); this.$store - .dispatch('localUsers/deleteUsers', this.selectedRows) + .dispatch('userManagement/deleteUsers', this.selectedRows) .then((messages) => { messages.forEach(({ type, message }) => { if (type === 'success') this.successToast(message); @@ -330,7 +332,7 @@ export default { case 'enable': this.startLoader(); this.$store - .dispatch('localUsers/enableUsers', this.selectedRows) + .dispatch('userManagement/enableUsers', this.selectedRows) .then((messages) => { messages.forEach(({ type, message }) => { if (type === 'success') this.successToast(message); @@ -342,7 +344,7 @@ export default { case 'disable': this.startLoader(); this.$store - .dispatch('localUsers/disableUsers', this.selectedRows) + .dispatch('userManagement/disableUsers', this.selectedRows) .then((messages) => { messages.forEach(({ type, message }) => { if (type === 'success') this.successToast(message); @@ -368,7 +370,7 @@ export default { saveAccountSettings(settings) { this.startLoader(); this.$store - .dispatch('localUsers/saveAccountSettings', settings) + .dispatch('userManagement/saveAccountSettings', settings) .then((message) => this.successToast(message)) .catch(({ message }) => this.errorToast(message)) .finally(() => this.endLoader()); diff --git a/src/views/SecurityAndAccess/UserManagement/index.js b/src/views/SecurityAndAccess/UserManagement/index.js new file mode 100644 index 00000000..c3aebec3 --- /dev/null +++ b/src/views/SecurityAndAccess/UserManagement/index.js @@ -0,0 +1,2 @@ +import UserManagement from './UserManagement.vue'; +export default UserManagement; diff --git a/src/views/Settings/SecuritySettings/index.js b/src/views/Settings/SecuritySettings/index.js deleted file mode 100644 index 5ec2b615..00000000 --- a/src/views/Settings/SecuritySettings/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import SecuritySettings from './SecuritySettings.vue'; -export default SecuritySettings; |