authorize for read

NAML documentation   Watch a video
   Usages of this macro
The source code below doesn't have navigation links because no usage has been compiled yet. Navigation links depend on how and where the macro is used, so first you may try finding all usages of "authorize for read".
... in authorize for read.naml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<override_macro name="authorize for read" requires="read_authorization,servlet">
    <n.if.visitor.is_anonymous>
        <then>
            <n.redirect_to.>
                <n.login_path>
                  
                    <message>
                        <t>You must login to view the THST Forum. If you are not a member, you can register now.
                        </t>
                      
                    </message>
                    
                
                    <nextUrl>
                        <n.current_path/>
                    </nextUrl>
                </n.login_path>
            </n.redirect_to.>
            <n.false />
            <n.exit />
        </then>
    </n.if.visitor.is_anonymous>
    <n.if>
        <condition.either>
            <condition1.visitor.can_view.authorization_node />
            <condition2.visitor.owns.get_node_from_parameter />
        </condition.either>
        <then.true />
        <else>
            <n.redirect_to.authorization_node.unauthorized_path />
            <n.false />
        </else>
    </n.if>
    
</override_macro>
Overrides default macro
... in permissions.naml
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
<macro name="authorize for read" requires="read_authorization,servlet">
    <n.if.visitor.is_anonymous>
        <then>
            <n.redirect_to.>
                <n.login_path>
                    <message>
                        <t>You must login to view <t.subject.authorization_node.subject/>.</t>
                    </message>
                    <nextUrl>
                        <n.current_path/>
                    </nextUrl>
                </n.login_path>
            </n.redirect_to.>
            <n.false />
            <n.exit />
        </then>
    </n.if.visitor.is_anonymous>
    <n.if>
        <condition.either>
            <condition1.visitor.can_view.authorization_node />
            <condition2.visitor.owns.get_node_from_parameter />
        </condition.either>
        <then.true />
        <else>
            <n.redirect_to.authorization_node.unauthorized_path />
            <n.false />
        </else>
    </n.if>
</macro>