handle_new_node_permission_error

NAML documentation   Watch a video
   Usages of this macro
... in handle_new_node_permission_error.naml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<override_macro name="handle_new_node_permission_error">
    <n.catch_exception
Binary
Namespace: BasicNamespace
Parameters: id, do
. id="check-permission">
        <n.visitor
Binary
Namespace: ServletNamespace
Parameters: do
.check_posting_under
Macro
Requires: user
Parameters: node_attr
.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
/>
    </n.catch_exception.>
    <n.handle_exception
Binary
Namespace: NabbleNamespace
Parameters: for, do
. for="check-permission">
        <n.exception
Binary
Namespace: ExceptionNamespace
Parameters: name, do
. name="no_create_topic_permission">
            <n.new_topic_forbidden_page
Macro
/>
        </n.exception.>
        <n.exception
Binary
Namespace: ExceptionNamespace
Parameters: name, do
. name="read_only">
            <n.new_topic_forbidden_page
Macro
/>
        </n.exception.>
        <n.exception
Binary
Namespace: ExceptionNamespace
Parameters: name, do
. name="no_reply_permission">
            <n.redirect_to
Binary
Namespace: ServletNamespace
Parameters: url
.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.node_with_permission
Binary
Namespace: NodeNamespace
Parameters: permission, do
 permission="[n.reply_permission
Macro
/]" do="[n.unauthorized_path
Macro
Requires: node
/]" />
        </n.exception.>
        <n.exception
Binary
Namespace: ExceptionNamespace
Parameters: name, do
. name="banned">
            <n.ban_error_page
Macro
/>
        </n.exception.>
        <n.exception
Binary
Namespace: ExceptionNamespace
Parameters: name, do
. name="no_anonymous">
            <n.login
Macro
Requires: servlet
Parameters: message
.><t>You must login to your account.</t></n.login.>
        </n.exception.>
    </n.handle_exception.>
</override_macro>
Overrides default macro
... in reply.naml
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<macro name="handle_new_node_permission_error">
    <n.catch_exception. id="check-permission">
        <n.visitor.check_posting_under.page_node/>
    </n.catch_exception.>
    <n.handle_exception. for="check-permission">
        <n.exception. name="no_create_topic_permission">
            <n.new_topic_forbidden_page/>
        </n.exception.>
        <n.exception. name="read_only">
            <n.new_topic_forbidden_page/>
        </n.exception.>
        <n.exception. name="no_reply_permission">
            <n.redirect_to.page_node.node_with_permission permission="[n.reply_permission/]" do="[n.unauthorized_path/]" />
        </n.exception.>
        <n.exception. name="banned">
            <n.ban_error_page/>
        </n.exception.>
        <n.exception. name="no_anonymous">
            <n.login.><t>You must login to your account.</t></n.login.>
        </n.exception.>
    </n.handle_exception.>
</macro>