can_view

NAML documentation   Watch a video
   Usages of this macro
... in permissions.naml
250
251
252
253
254
255
256
257
258
259
260
261
262
<macro name="can_view" requires="user" dot_parameter="node_attr">
    <n.set_local_user
Macro
Parameters: user
.this_user
Binary
Namespace: UserNamespace
Parameters: do
 />
    <n.set_local_node
Macro
Parameters: node
.node_attr/>
    <n.block
Binary
Namespace: BasicNamespace
Parameters: do
.>
        <n.either
Binary
Namespace: BasicNamespace
Parameters: condition1, condition2
>
            <condition1.local_user
Macro
Parameters: do
.owns
Binary
Namespace: UserNamespace
Parameters: node
.local_node
Macro
Parameters: do
/>
            <condition2.either
Binary
Namespace: BasicNamespace
Parameters: condition1, condition2
>
                <condition1.local_user
Macro
Parameters: do
.has_permission
Binary
Namespace: UserNamespace
Parameters: node, permission_node, permission
 node="[n.local_node
Macro
Parameters: do
/]" permission_node="[n.local_node
Macro
Parameters: do
.app_or_root
Macro
Requires: node
Parameters: do
/]" permission="[n.view_permission
Binary
Namespace: NabbleNamespace
/]" />
                <condition2.local_user
Macro
Parameters: do
.is_site_admin
Macro
Requires: user
 />
            </condition2.either>
        </n.either>
    </n.block.>
</macro>