mirror of
https://github.com/seriousm4x/UpSnap.git
synced 2026-03-31 06:24:11 -04:00
* from now on, upsnap always requires authentification (user or admin) * users can view the dashboard and use wake/shutdown (read only) * admins can do everything (add, modify and delete) * make navbar collapse on small screens
This commit is contained in:
@@ -41,6 +41,7 @@ func StartPocketBase(distDirFS fs.FS) {
|
||||
Handler: HandlerWake,
|
||||
Middlewares: []echo.MiddlewareFunc{
|
||||
apis.ActivityLogger(App),
|
||||
apis.RequireAdminOrRecordAuth("users"),
|
||||
},
|
||||
})
|
||||
|
||||
@@ -51,6 +52,7 @@ func StartPocketBase(distDirFS fs.FS) {
|
||||
Handler: HandlerShutdown,
|
||||
Middlewares: []echo.MiddlewareFunc{
|
||||
apis.ActivityLogger(App),
|
||||
apis.RequireAdminOrRecordAuth("users"),
|
||||
},
|
||||
})
|
||||
|
||||
@@ -61,6 +63,7 @@ func StartPocketBase(distDirFS fs.FS) {
|
||||
Handler: HandlerScan,
|
||||
Middlewares: []echo.MiddlewareFunc{
|
||||
apis.ActivityLogger(App),
|
||||
apis.RequireAdminAuth(),
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user