feat: Add new data-manager service for professor and module management and a new frontend application with i18n and a professor dashboard.

This commit is contained in:
Elmar Kresse
2025-11-22 20:20:00 +01:00
parent 48926233d5
commit 34ad90d50d
19 changed files with 769 additions and 68 deletions

View File

@@ -0,0 +1,32 @@
package migrations
import (
"github.com/pocketbase/pocketbase/core"
m "github.com/pocketbase/pocketbase/migrations"
)
func init() {
m.Register(func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("users")
if err != nil {
return err
}
// Enable OAuth2
collection.OAuth2.Enabled = true
// Optional: Map fields if necessary, for now just enabling it
// collection.OAuth2.MappedFields.Name = "name"
return app.Save(collection)
}, func(app core.App) error {
collection, err := app.FindCollectionByNameOrId("users")
if err != nil {
return err
}
collection.OAuth2.Enabled = false
return app.Save(collection)
})
}