8000 feat: remove site wide perms from creating a workspace by Emyrk · Pull Request #17296 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: remove site wide perms from creating a workspace #17296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 9, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

8000
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rename authz err
  • Loading branch information
Emyrk committed Apr 8, 2025
commit 6ac8a927d94362edd64404375d74d86cdff21c09
12 changes: 6 additions & 6 deletions coderd/coderdtest/authorize.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,9 @@ func (r *RecordingAuthorizer) Authorize(ctx context.Context, subject rbac.Subjec
if r.Wrapped == nil {
panic("Developer error: RecordingAuthorizer.Wrapped is nil")
}
err := r.Wrapped.Authorize(ctx, subject, action, object)
r.recordAuthorize(subject, action, object, err)
return err
authzErr := r.Wrapped.Authorize(ctx, subject, action, object)
r.recordAuthorize(subject, action, object, authzErr)
return authzErr
}

func (r *RecordingAuthorizer) Prepare(ctx context.Context, subject rbac.Subject, action policy.Action, objectType string) (rbac.PreparedAuthorized, error) {
Expand Down Expand Up @@ -344,11 +344,11 @@ func (s *PreparedRecorder) Authorize(ctx context.Context, object rbac.Object) er
s.rw.Lock()
defer s.rw.Unlock()

err := s.prepped.Authorize(ctx, object)
authzErr := s.prepped.Authorize(ctx, object)
if !s.usingSQL {
s.rec.recordAuthorize(s.subject, s.action, object, err)
s.rec.recordAuthorize(s.subject, s.action, object, authzErr)
}
return err
return authzErr
}

func (s *PreparedRecorder) CompileToSQL(ctx context.Context, cfg regosql.ConvertConfig) (string, error) {
Expand Down
0