     { message } = @props
 
     return null  unless message
-    return null  if (message.get('accountId') isnt whoami().socialApiId) and not checkFlag('super-admin')
+
+    return null  if not @canEditPost() or not @canDeletePost()
 
     <div className={@props.className}>
       <ButtonWithMenu items={@getMenuItems()} />

    onClose            : @bound "closeMarkUserAsTrollModal"
    buttonConfirmTitle : "YES, THIS USER IS DEFINITELY A TROLL"


  getMenuItems: ->

    if checkFlag('super-admin') and not @props.disableAdminMenuItems
    then @getAdminMenuItems()
    else @getDefaultMenuItems()


  getDefaultMenuItems: ->

    return [
      {title: 'Edit Post'  , key: 'editpost'            , onClick: @bound 'editPost'}
      {title: 'Delete Post', key: 'showdeletepostprompt', onClick: @bound 'showDeletePostPromptModal'}
    ]


  getMarkUserMenuItem: ->

ActivityPromptModal   = require 'app/components/activitypromptmodal'
MarkUserAsTrollModal  = require 'app/components/markuserastrollmodal'
showErrorNotification = require 'app/util/showErrorNotification'
hasPermission         = require 'app/util/hasPermission'

module.exports = class MessageItemMenu extends React.Component

