MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / adminCheck

Function adminCheck

cmd/cql-proxy/api/admin_oauth.go:113–122  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

111}
112
113func adminCheck(c *gin.Context) {
114 s := getSession(c)
115
116 if s.MustGetBool("admin") {
117 c.Next()
118 return
119 }
120
121 abortWithError(c, http.StatusForbidden, ErrNotAuthorizedAdmin)
122}
123
124func getDeveloperInfo(c *gin.Context) {
125 developer := getDeveloperID(c)

Callers

nothing calls this directly

Calls 4

getSessionFunction · 0.85
abortWithErrorFunction · 0.85
MustGetBoolMethod · 0.80
NextMethod · 0.45

Tested by

no test coverage detected