canModifyPost

Function

Determines if the given user has sufficient privileges to modify a post's editable attributes

  • canModifyPost(post: IPost, user: IUser) : boolean

Parameters

Parameter Type Default Notes
post Required IPost

An IPost object

user Required IUser

An IUser object

Returns

true if the user can modify the post

boolean

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