Compare commits
3 Commits
39a6ab5fcc
...
ea566d4a42
| Author | SHA1 | Date | |
|---|---|---|---|
|
ea566d4a42
|
|||
|
573e327a0f
|
|||
|
831e81e892
|
40
docs/users_roles_permissions.md
Normal file
40
docs/users_roles_permissions.md
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# Users, Roles and Permissions
|
||||||
|
|
||||||
|
This is the design document for https://gitea.toal.ca/oys/bab-app/issues/11
|
||||||
|
|
||||||
|
## Backend Concepts
|
||||||
|
|
||||||
|
Utilizing the AppWrite backend provides us with some basic concepts we can use:
|
||||||
|
|
||||||
|
### Users, Groups, and Labels
|
||||||
|
|
||||||
|
#### Teams
|
||||||
|
|
||||||
|
Teams are AppWrite groups of users. Teams can be assigned roles, which can be assigned permissions. Teams "contain" users. A team has more permissions to manage it's members than labels, which are assigned / removed, rather than 'invited / left'.
|
||||||
|
|
||||||
|
#### Labels
|
||||||
|
|
||||||
|
Labels are AppWrite tags for users. Users have Labels as attributes. Like teams, labels can be used for Role / Permission mapping.
|
||||||
|
|
||||||
|
### Permissions
|
||||||
|
|
||||||
|
https://appwrite.io/docs/advanced/platform/permissions
|
||||||
|
|
||||||
|
Permissions are fine-grained access control for users and objects. They follow standard "CRUD" patterns.
|
||||||
|
|
||||||
|
## BAB Concepts
|
||||||
|
|
||||||
|
For teams, there will, to start, be the following:
|
||||||
|
|
||||||
|
- `staff` : Individuals with authority / responsibilities
|
||||||
|
- `maintenance` : Staff responsible for maintenance (eg: Boatswain)
|
||||||
|
- `admin`: Administrators of the program / application
|
||||||
|
- `school` : Members of the Sailing School (Instructors & Students)
|
||||||
|
- `student` role : A student in the school
|
||||||
|
- `instructor` role: An instructor in the school
|
||||||
|
- `bab` : Members of the BAB program
|
||||||
|
- `skipper` role: A member who has passed skipper certification
|
||||||
|
|
||||||
|
The following are the initial labels:
|
||||||
|
|
||||||
|
- TBD
|
||||||
9655
package-lock.json
generated
Normal file
9655
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,7 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
||||||
"@typescript-eslint/parser": "^5.10.0",
|
"@typescript-eslint/parser": "^5.10.0",
|
||||||
"autoprefixer": "^10.4.2",
|
"autoprefixer": "^10.4.2",
|
||||||
|
"dotenv": "^16.3.1",
|
||||||
"eslint": "^8.10.0",
|
"eslint": "^8.10.0",
|
||||||
"eslint-config-prettier": "^8.1.0",
|
"eslint-config-prettier": "^8.1.0",
|
||||||
"eslint-plugin-vue": "^9.0.0",
|
"eslint-plugin-vue": "^9.0.0",
|
||||||
@@ -38,10 +39,11 @@
|
|||||||
"workbox-expiration": "^7.0.0",
|
"workbox-expiration": "^7.0.0",
|
||||||
"workbox-precaching": "^7.0.0",
|
"workbox-precaching": "^7.0.0",
|
||||||
"workbox-routing": "^7.0.0",
|
"workbox-routing": "^7.0.0",
|
||||||
"workbox-strategies": "^7.0.0"
|
"workbox-strategies": "^7.0.0",
|
||||||
|
"yarn": "^1.22.21"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18 || ^16 || ^14.19",
|
"node": "^20 || ^18 || ^16 || ^14.19",
|
||||||
"npm": ">= 6.13.4",
|
"npm": ">= 6.13.4",
|
||||||
"yarn": ">= 1.21.1"
|
"yarn": ">= 1.21.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ module.exports = configure(function (/* ctx */) {
|
|||||||
|
|
||||||
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#build
|
||||||
build: {
|
build: {
|
||||||
|
env: require('dotenv').config({ path: '.env.local' }).parsed,
|
||||||
target: {
|
target: {
|
||||||
browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
|
browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
|
||||||
node: 'node16',
|
node: 'node16',
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ const client = new Client();
|
|||||||
|
|
||||||
// Private self-hosted appwrite
|
// Private self-hosted appwrite
|
||||||
client
|
client
|
||||||
.setEndpoint('https://apidev.bab.toal.ca/v1')
|
.setEndpoint(process.env.APPWRITE_API_ENDPOINT)
|
||||||
.setProject('655a7116479b4d5a815f');
|
.setProject(process.env.APPWRITE_API_PROJECT);
|
||||||
//TODO
|
//TODO
|
||||||
const appDatabaseId = '';
|
const appDatabaseId = '';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user