currentUserID returns the authenticated user's ID, or empty string.
(r *http.Request)
| 512 | |
| 513 | // currentUserID returns the authenticated user's ID, or empty string. |
| 514 | func 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 |
no test coverage detected