MCPcopy Create free account
hub / github.com/53AI/53AIHub / hasLibraryManagementPermission

Method hasLibraryManagementPermission

api/service/mcp/key_service.go:201–207  ·  view source on GitHub ↗
(eid, userID, libraryID int64)

Source from the content-addressed store, hash-verified

199}
200
201func (s *APIKeyService) hasLibraryManagementPermission(eid, userID, libraryID int64) (bool, error) {
202 permission, err := core.GetUserPermission(eid, model.RESOURCE_TYPE_LIBRARY, libraryID, userID)
203 if err != nil {
204 return false, err
205 }
206 return permission >= model.PERMISSION_MANAGE, nil
207}

Callers 2

resolveAPIKeyScopeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected