MCPcopy Create free account
hub / github.com/QuantumNous/new-api / canManageTargetRole

Function canManageTargetRole

controller/user.go:346–348  ·  view source on GitHub ↗
(myRole int, targetRole int)

Source from the content-addressed store, hash-verified

344}
345
346func canManageTargetRole(myRole int, targetRole int) bool {
347 return myRole == common.RoleRootUser || myRole > targetRole
348}
349
350func GetUser(c *gin.Context) {
351 id, err := strconv.Atoi(c.Param("id"))

Callers 8

AdminDisable2FAFunction · 0.85
AdminResetPasskeyFunction · 0.85
UnbindCustomOAuthByAdminFunction · 0.85
GetUserFunction · 0.85
UpdateUserFunction · 0.85
AdminClearUserBindingFunction · 0.85
ManageUserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected