canDeletePost

Function

Determines if the given user has sufficient privileges to delete the given post

  • canDeletePost(post: IPost, channel: IChannel, user: IUser) : boolean

Parameters

Parameter Type Default Notes
post Required IPost

An IPost object

channel Required IChannel

An IChannel object

user Required IUser

An IUser object

Returns

true if the user can delete the post

boolean

Function defined in discussions/src/utils/posts.ts:89