Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb0df965

Browse files
committed
minor dbauthz changes
1 parent7b118ac commitb0df965

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎coderd/database/dbauthz/dbauthz.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ func (q *querier) DeleteOAuth2ProviderAppCodeByID(ctx context.Context, id uuid.U
826826
iferr!=nil {
827827
returnerr
828828
}
829-
iferr:=q.authorizeContext(ctx,rbac.ActionDelete,rbac.ResourceOAuth2ProviderAppCodeToken.WithOwner(code.UserID.String()));err!=nil {
829+
iferr:=q.authorizeContext(ctx,rbac.ActionDelete,code);err!=nil {
830830
returnerr
831831
}
832832
returnq.db.DeleteOAuth2ProviderAppCodeByID(ctx,id)
@@ -1222,7 +1222,7 @@ func (q *querier) GetOAuth2ProviderApps(ctx context.Context) ([]database.OAuth2P
12221222
}
12231223

12241224
func (q*querier)GetOAuth2ProviderAppsByUserID(ctx context.Context,userID uuid.UUID) ([]database.GetOAuth2ProviderAppsByUserIDRow,error) {
1225-
//These twoauthzchecks make sure the caller can read all their own tokens.
1225+
//Thisauthzcheck is to make sure the caller can read all their own tokens.
12261226
iferr:=q.authorizeContext(ctx,rbac.ActionRead,
12271227
rbac.ResourceOAuth2ProviderAppCodeToken.WithOwner(userID.String()));err!=nil {
12281228
return []database.GetOAuth2ProviderAppsByUserIDRow{},err

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp