mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-15 07:11:15 +00:00
fix user creation (#411)
This commit is contained in:
@@ -45,6 +45,14 @@ func SystemAdminContextUserInfo() *ContextUserInfo {
|
||||
}
|
||||
}
|
||||
|
||||
// LdapSyncContextUserInfo returns a context user info for the LDAP syncer.
|
||||
func LdapSyncContextUserInfo() *ContextUserInfo {
|
||||
return &ContextUserInfo{
|
||||
Id: CtxSystemLdapSyncer,
|
||||
IsAdmin: true,
|
||||
}
|
||||
}
|
||||
|
||||
// SetUserInfo sets the user info in the context.
|
||||
func SetUserInfo(ctx context.Context, info *ContextUserInfo) context.Context {
|
||||
ctx = context.WithValue(ctx, CtxUserInfo, info)
|
||||
|
Reference in New Issue
Block a user