-
-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use correct context keys when retrieving userID & role
- Loading branch information
1 parent
3c4370e
commit 314bf22
Showing
4 changed files
with
24 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) |