can_edit

   Usages of this macro
... in permissions.naml
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<macro name="can_edit" 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.both
Binary
Namespace: BasicNamespace
Parameters: condition1, condition2
>
            <condition1.not
Binary
Namespace: BasicNamespace
Parameters: condition
.local_user
Macro
Parameters: do
.is_banned
Binary
Namespace: UserNamespace
/>
            <condition2.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.edit_all_permission
Macro
/]" />
                    <condition2.both
Binary
Namespace: BasicNamespace
Parameters: condition1, condition2
>
                        <condition1.local_node
Macro
Parameters: do
.is_app
Binary
Namespace: NodeNamespace
/>
                        <condition2.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.edit_app_permission
Macro
/]" />
                    </condition2.both>
                </condition2.either>
            </condition2.either>
        </n.both>
    </n.block.>
</macro>