develop
This commit is contained in:
parent
d76ee19be7
commit
26609eb46c
11 changed files with 251 additions and 70 deletions
16
frontend/src/stores/user.js
Normal file
16
frontend/src/stores/user.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { defineStore } from "pinia";
|
||||
|
||||
export const useUserStore = defineStore("user", {
|
||||
state: () => ({
|
||||
username: "",
|
||||
roles: [],
|
||||
}),
|
||||
actions: {
|
||||
check_permission(role) {
|
||||
if (this.roles.includes(role)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue