fix: use correct context keys when retrieving userID & role

This commit is contained in:
Jordan Knott
2020-08-21 23:08:30 -05:00
parent 3c4370e68a
commit 314bf224ea
4 changed files with 24 additions and 21 deletions

13
internal/utils/context.go Normal file
View File

@ -0,0 +1,13 @@
package utils
// ContextKey represents a context key
type ContextKey string
const (
// UserIDKey is the key for the user id of the authenticated user
UserIDKey ContextKey = "userID"
//RestrictedModeKey is the key for whether the authenticated user only has access to install route
RestrictedModeKey ContextKey = "restricted_mode"
// OrgRoleKey is the key for the organization role code of the authenticated user
OrgRoleKey ContextKey = "org_role"
)