MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / currentUserID

Function currentUserID

internal/server/middleware_auth.go:514–519  ·  view source on GitHub ↗

currentUserID returns the authenticated user's ID, or empty string.

(r *http.Request)

Source from the content-addressed store, hash-verified

512
513// currentUserID returns the authenticated user's ID, or empty string.
514func currentUserID(r *http.Request) string {
515 if u := currentUser(r); u != nil {
516 return u.ID
517 }
518 return ""
519}
520
521// RequireWorkspaceAccess checks that the current user is a member of the
522// workspace identified by the {slug} URL parameter. The user's workspace

Callers 15

handleImportURLMethod · 0.85
handleInviteMemberMethod · 0.85
handleRemoveMemberMethod · 0.85
logAuditEventMethod · 0.85
handleCreateItemGrantMethod · 0.85
handleListUserGrantsMethod · 0.85
handleSSEMethod · 0.85

Calls 1

currentUserFunction · 0.85

Tested by

no test coverage detected