8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63727e0 commit 96a5727Copy full SHA for 96a5727
coderd/httpmw/authorize.go
@@ -83,10 +83,12 @@ type authObjectKey struct{}
83
type RBACObject struct {
84
Object rbac.Object
85
86
+ // WithOwner will set the Object.Owner field based on the request.
87
+ // This allows the Owner field to be set dynamically based on the context
88
+ // of the request.
89
WithOwner func(r *http.Request) uuid.UUID
90
}
91
-// APIKey returns the API key from the ExtractAPIKey handler.
92
func rbacObject(r *http.Request) RBACObject {
93
obj, ok := r.Context().Value(authObjectKey{}).(RBACObject)
94
if !ok {
0 commit comments