can_delete

NAML documentation   Watch a video
   Usages of this macro
... in can_delete.naml
1
2
3
4
5
6
<override_macro name="can_delete" requires="user" dot_parameter="node_attr">  
        <n.either
Binary
Namespace: BasicNamespace
Parameters: condition1, condition2
>  
            <condition1.both
Binary
Namespace: BasicNamespace
Parameters: condition1, condition2
 condition1="[n.not
Binary
Namespace: BasicNamespace
Parameters: condition
.is_bad_guy
Macro
Requires: user
/]" condition2="[n.owns
Binary
Namespace: UserNamespace
Parameters: node
.node_attr/]"/>  
            <condition2.is_in_group
Binary
Namespace: UserNamespace
Parameters: group
 group="Moderators" />  
        </n.either>  
</override_macro>
Overrides default macro
... in permissions.naml
104
105
106
<macro name="can_delete" requires="user" dot_parameter="node_attr">
    <n.both condition1="[n.not.is_banned/]" condition2="[n.owns.node_attr/]"/>
</macro>