feat: add support for required oauth groups

This commit is contained in:
Stavros
2025-04-28 22:49:56 +03:00
parent dca09a3d9d
commit 065b9eaf3d
10 changed files with 154 additions and 90 deletions

View File

@@ -114,12 +114,13 @@ func (hooks *Hooks) UseUserContext(c *gin.Context) types.UserContext {
// Return user context since we are logged in with oauth
return types.UserContext{
Username: cookie.Username,
Name: cookie.Name,
Email: cookie.Email,
IsLoggedIn: true,
OAuth: true,
Provider: cookie.Provider,
Username: cookie.Username,
Name: cookie.Name,
Email: cookie.Email,
IsLoggedIn: true,
OAuth: true,
Provider: cookie.Provider,
OAuthGroups: cookie.OAuthGroups,
}
}