GetAdminContext will return an admin context. This can be used internally when fetching users.
(ctx context.Context)
| 312 | // GetAdminContext will return an admin context. This can be used internally |
| 313 | // when fetching users. |
| 314 | func GetAdminContext(ctx context.Context) context.Context { |
| 315 | if ctx == nil { |
| 316 | ctx = context.Background() |
| 317 | } |
| 318 | ctx = SetUserID(ctx, "") |
| 319 | ctx = SetAdmin(ctx, true) |
| 320 | ctx = SetIsEnabled(ctx, true) |
| 321 | return ctx |
| 322 | } |