refactor admin functions in store to use active account - introduce admin middleware

This commit is contained in:
Michael Dausmann
2023-02-24 21:09:49 +11:00
parent f2b3a2617d
commit a341a641e8
6 changed files with 57 additions and 22 deletions

View File

@@ -17,9 +17,10 @@
<h3>Notes Dashboard</h3>
<p v-for="note in notes">{{ note.note_text }}</p>
<button @click.prevent="store.changeAccountPlan(2)">Change Account Plan to 2</button>
<button @click.prevent="store.joinUserToAccount(5)">Join user to account 5</button>
<button @click.prevent="store.changeUserAccessWithinAccount(4, 5, 'ADMIN')">Change user 4 access within account 5 to ADMIN</button>
<button @click.prevent="store.claimOwnershipOfAccount(5)">Claim Account 5 Ownership for current user</button>
<button @click.prevent="store.changeAccountPlan(2)">Change active Account Plan to 2</button>
<button @click.prevent="store.joinUserToAccount(4)">Join user 4 to active account</button>
<button @click.prevent="store.changeUserAccessWithinAccount(4, 'OWNER')">Change user 4 access within account 5 to OWNER (SHOULD FAIL)</button>
<button @click.prevent="store.changeUserAccessWithinAccount(4, 'ADMIN')">Change user 4 access within account 5 to ADMIN</button>
<button @click.prevent="store.claimOwnershipOfAccount()">Claim Account 5 Ownership for current user</button>
</div>
</template>