Skip to content

feat: audit addition and removal of licenses #6125

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 11 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

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
remove logs
  • Loading branch information
Kira-Pilot committed Feb 8, 2023
commit 222ab40106cf4d889eda717bb06252aaba363fcc
4 changes: 0 additions & 4 deletions coderd/audit/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ func ResourceType[T Auditable](tgt T) database.ResourceType {
// that should be deferred, causing the audit log to be committed when the
// handler returns.
func InitRequest[T Auditable](w http.ResponseWriter, p *RequestParams) (*Request[T], func()) {
fmt.Println("im in the init request")
sw, ok := w.(*tracing.StatusWriter)
if !ok {
panic("dev error: http.ResponseWriter is not *tracing.StatusWriter")
Expand All @@ -145,7 +144,6 @@ func InitRequest[T Auditable](w http.ResponseWriter, p *RequestParams) (*Request
}

return req, func() {
fmt.Println("im in the init request callback")

ctx := context.Background()
logCtx := p.Request.Context()
Expand All @@ -158,8 +156,6 @@ func InitRequest[T Auditable](w http.ResponseWriter, p *RequestParams) (*Request
// TODO: introduce the concept of an anonymous user so we always have a userID even
// when dealing with a mystery user. https://github.com/coder/coder/issues/6054
if req.params.Action != database.AuditActionLogin && req.params.Action != database.AuditActionLogout {
fmt.Println("im silently bailing")

return
}
}
Expand Down
2 changes: 0 additions & 2 deletions enterprise/coderd/licenses.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
_ "embed"
"encoding/base64"
"encoding/json"
"fmt"
"net/http"
"strconv"
"strings"
Expand Down Expand Up @@ -61,7 +60,6 @@ var Keys = map[string]ed25519.PublicKey{"2022-08-12": ed25519.PublicKey(key20220
// @Success 201 {object} codersdk.License
// @Router /licenses [post]
func (api *API) postLicense(rw http.ResponseWriter, r *http.Request) {
fmt.Println("im in postLicense")
var (
ctx = r.Context()
auditor = api.AGPL.Auditor.Load()
Expand Down