MCPcopy Index your code
hub / github.com/codecombat/codecombat / getClientCreatorPermissions

Method getClientCreatorPermissions

app/models/User.js:351–365  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

349 }
350
351 async getClientCreatorPermissions () {
352 let clientID = this.get('clientCreator')
353 if (!clientID) {
354 clientID = utils.getApiClientIdFromEmail(this.get('email'))
355 }
356 if (clientID) {
357 try {
358 const apiClient = await api.apiClients.getByHandle(clientID)
359 this.clientPermissions = apiClient.permissions
360 return this.clientPermissions
361 } catch (e) {
362 console.error(e)
363 }
364 }
365 }
366
367 canManageLicensesViaUI () { return this.clientPermissions?.manageLicensesViaUI != null ? this.clientPermissions?.manageLicensesViaUI : true }
368

Callers 12

onLoadedMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
initializeMethod · 0.80
initializeMethod · 0.80
initializeMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80
initializeMethod · 0.80
initializeMethod · 0.80

Calls 2

getMethod · 0.95
errorMethod · 0.45

Tested by

no test coverage detected