# HG changeset patch # User Yaroslav Zhuravlev # Date 1614968559 0 # Node ID e53592a1d979975c8fe764194867257a00e065da # Parent 5c4199cfdc1649fc85a3759ec732093eb1b5f7f0 Improved descriptions of s.done, s.allow, s.decline, s.deny. diff -r 5c4199cfdc16 -r e53592a1d979 xml/en/docs/njs/reference.xml --- a/xml/en/docs/njs/reference.xml Thu Mar 04 16:38:20 2021 +0000 +++ b/xml/en/docs/njs/reference.xml Fri Mar 05 18:22:39 2021 +0000 @@ -9,7 +9,7 @@
+ rev="67">
@@ -470,27 +470,61 @@ s.allow() -successfully finalizes the phase handler +an alias to +s.done(0) (0.2.4) s.decline() -finalizes the phase handler and passes control to the next handler +an alias to +s.done(-5) (0.2.4) s.deny() -finalizes the phase handler with the access error code +an alias to +s.done(403) (0.2.4) -s.done([code]) +s.done([code]) -successfully finalizes the current phase handler -or finalizes it with the specified numeric code +sets an exit code for the current +phase handler +to a code value, by default 0. +The actual finalization happens when the js handler is completed +and all pending events, for example, from +ngx.fetch or +setTimeout(), +are processed (0.2.4). + +Possible code values: + + + +0— +successful finalization, passing control to the next phase + + + +-5— +undecided, passing control to the next handler of the current phase (if any) + + + +403— +access is forbidden + + + + +May be called only from a phase handler function: +js_access +or +js_preread. s.error(string)