Skip to content

basalt / comments/src / CommentRoutesOptions

Interface: CommentRoutesOptions ​

Defined in: comments/src/plugin.ts:76

Properties ​

authorize? ​

> optional authorize?: (action, target, user) => boolean | Promise<boolean>

Defined in: comments/src/plugin.ts:83

Decides whether user may perform action on target. Replaces the default policy — compose with defaultCommentPolicy to keep it. Use it to tie a thread to the access rules of the resource it discusses (a confidential matter's comments are as confidential as the matter).

Parameters ​

action ​

CommentAction

target ​

CommentTarget

user ​

CommentRouteUser

Returns ​

boolean | Promise<boolean>

Released under the MIT License.