MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / getError

Method getError

lib/acl-checker.mjs:156–162  ·  view source on GitHub ↗
(user, mode)

Source from the content-addressed store, hash-verified

154 }
155
156 async getError (user, mode) {
157 const cacheKey = `${mode}-${user}`
158 // TODO ?? add to can: req.method and resourceExists. Actually all tests pass
159 this.aclCached[cacheKey] = this.aclCached[cacheKey] || this.can(user, mode)
160 const isAllowed = await this.aclCached[cacheKey]
161 return isAllowed ? null : this.messagesCached[cacheKey].reduce((prevMsg, msg) => msg.status > prevMsg.status ? msg : prevMsg, { status: 0 })
162 }
163
164 static getDirectory (aclFile) {
165 const parts = aclFile.split('/')

Callers 3

checkPermissionFunction · 0.80
checkPermissionFunction · 0.80
allowFunction · 0.80

Calls 1

canMethod · 0.95

Tested by

no test coverage detected