SetAdmin sets the isAdmin flag on the context
(ctx context.Context, isAdmin bool)
| 281 | |
| 282 | // SetAdmin sets the isAdmin flag on the context |
| 283 | func SetAdmin(ctx context.Context, isAdmin bool) context.Context { |
| 284 | return context.WithValue(ctx, isAdminKey, isAdmin) |
| 285 | } |
| 286 | |
| 287 | // IsAdmin returns a boolean indicating whether |
| 288 | // or not the context belongs to a logged in user |
no outgoing calls
no test coverage detected