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

Function getPermissionsFor

lib/header.mjs:134–138  ·  view source on GitHub ↗
(acl, user, req)

Source from the content-addressed store, hash-verified

132
133// Gets the permissions string for the given user and resource
134async function getPermissionsFor (acl, user, req) {
135 const accesses = MODES.map(mode => acl.can(user, mode))
136 const allowed = await Promise.all(accesses)
137 return PERMISSIONS.filter((mode, i) => allowed[i]).join(' ')
138}

Callers 1

addPermissionsFunction · 0.85

Calls 1

canMethod · 0.80

Tested by

no test coverage detected