Converted sample project into an almost working Svelte / Meteor project. Needs to fix the login/logout code, the camera code, and add Chromebook history when the QR Code is scanned.

This commit is contained in:
2022-04-02 10:29:35 -07:00
parent 9e0e231152
commit 038c68f618
34 changed files with 3997 additions and 101 deletions

View File

@@ -1,6 +1,9 @@
#Login
##Google
# Login
## Google
This app is using the Google (oauth2) API to manage logins. To do that you have to have a service configuration in the database. Place the following in the XXX collection:
```
{
service: 'google',
@@ -8,3 +11,45 @@ This app is using the Google (oauth2) API to manage logins. To do that you have
secret: 'xxx'
}
```
# Roles
We are using the alanning:roles package to manage roles and attach them to users. Currently the project has no way to bootstrap the roles and assignment of an initial admin role. To work around this first log in with a user you want to be admin (so a user record exists), then get the _id of the user you created, and then use the following MongoDB queries to set things up:
```json
use DistrictCentral
db.createCollection("roles")
db.roles.insertMany([
{
"_id": "laptop-management",
"children": []
},
{
"_id": "admin",
"children": [
{
"_id": "laptop-management"
}
]
}
])
db.createCollection('role-assignment')
db.role-assignment.insert({
"role": {
"_id": "admin"
},
"scope": "global",
"user": {
"_id": "zwbMiaSKHix4bWQ8d"
},
"inheritedRoles": [
{
"_id": "admin"
},
{
"_id": "laptop-management"
}
]
})
```