grant(principal, node, permissions)

Grants the given permissions on the given node to the given principal. This method creates or modifies the security relationship between the first two parameters. Valid values for the permission list are read, write, delete and accessControl. The permissions are passed in as a comma-separated list (see the examples below). The return value is the empty string. See also revoke() and is_allowed().


${grant(me, node1, 'read')}
${grant(me, node2, 'read, write')}
${grant(me, node3, 'read, write, delete')}
${grant(me, node4, 'read, write, delete, accessControl')}


Related Articles
About this article
Last change 2018-05-04
Topics FrontendFunctionsSecurityStructr 2.0