grant()

Search
Feedback

Usage

grant(principal, node, permissions)

Description
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().

Example

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

Graph-Browser

Related Articles
About this article
Last change 2017-08-31
Topics FrontendFunctionsSecurityStructr 2.0