ROLE_COUNTER
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<button class="btn btn-info mr-2" @click="handleSyncList" :disabled="isFetching">
|
||||
<font-awesome-icon icon="sync" :spin="isFetching"></font-awesome-icon> <span>Odśwież listę</span>
|
||||
</button>
|
||||
<router-link :to="{ name: 'EventCreate' }" custom v-slot="{ navigate }" v-if="hasAnyAuthority('ROLE_ADMIN')">
|
||||
<router-link :to="{ name: 'EventCreate' }" custom v-slot="{ navigate }" v-if="hasAnyAuthority(['ROLE_ADMIN', 'ROLE_COUNTER'])">
|
||||
<button
|
||||
@click="navigate"
|
||||
id="jh-create-entity"
|
||||
@@ -58,7 +58,7 @@
|
||||
:to="{ name: 'EventEdit', params: { eventId: event.id } }"
|
||||
custom
|
||||
v-slot="{ navigate }"
|
||||
v-if="hasAnyAuthority('ROLE_ADMIN')"
|
||||
v-if="hasAnyAuthority(['ROLE_ADMIN', 'ROLE_COUNTER'])"
|
||||
>
|
||||
<button @click="navigate" class="btn btn-primary btn-sm edit" data-cy="entityEditButton">
|
||||
<font-awesome-icon icon="pencil-alt"></font-awesome-icon>
|
||||
|
||||
@@ -94,7 +94,7 @@ export default {
|
||||
path: 'registration/:registrationId/edit',
|
||||
name: 'RegistrationEdit',
|
||||
component: RegistrationUpdate,
|
||||
meta: { authorities: [Authority.USER] },
|
||||
meta: { authorities: [Authority.ADMIN] },
|
||||
},
|
||||
{
|
||||
path: 'registration/:registrationId/view',
|
||||
@@ -118,19 +118,19 @@ export default {
|
||||
path: 'transaction/new',
|
||||
name: 'TransactionCreate',
|
||||
component: TransactionUpdate,
|
||||
meta: { authorities: [Authority.ADMIN] },
|
||||
meta: { authorities: [Authority.ADMIN, Authority.COUNTER] },
|
||||
},
|
||||
{
|
||||
path: 'transaction/opposing/:opposingTransactionId/new',
|
||||
name: 'TransactionCreateOpposite',
|
||||
component: TransactionUpdate,
|
||||
meta: { authorities: [Authority.ADMIN] },
|
||||
meta: { authorities: [Authority.ADMIN, Authority.COUNTER] },
|
||||
},
|
||||
{
|
||||
path: 'transaction/:transactionId/edit',
|
||||
name: 'TransactionEdit',
|
||||
component: TransactionUpdate,
|
||||
meta: { authorities: [Authority.ADMIN] },
|
||||
meta: { authorities: [Authority.ADMIN, Authority.COUNTER] },
|
||||
},
|
||||
{
|
||||
path: 'transaction/:transactionId/view',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export enum Authority {
|
||||
ADMIN = 'ROLE_ADMIN',
|
||||
USER = 'ROLE_USER',
|
||||
COUNTER = 'ROLE_COUNTER',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user