Hello Naresh,
Regrettably, this behavior is by design. The edit/delete links are displayed only in following cases:
- the current user is global administrator
- the current user is owner of the user’s blog
- the current user is admin of group’s blog
- the current user is board moderator
- the current user is in role that has Modify permissions set to true for CMS.MessageBoards module
However, in any cases the user will be able to edit or delete all messages, not only his or her messages.
However, you can change this behavior in the code of following module:
~\CMSModules\MessageBoards\Controls\MessageBoard.ascx.csYou can control displaying buttons which will cover your needs by modifying following code in the
rptBoardMessages_ItemDataBound method:
// Handle buttons displaying
boardMsgActions.ShowApprove = ((this.BoardProperties.ShowApproveButton) && (!bmi.MessageApproved) && userVerified);
boardMsgActions.ShowReject = ((this.BoardProperties.ShowRejectButton) && (bmi.MessageApproved) && userVerified);
boardMsgActions.ShowDelete = ((this.BoardProperties.ShowDeleteButton) && userVerified);
boardMsgActions.ShowEdit = ((this.BoardProperties.ShowEditButton) && userVerified);
For example, following code snippet enables the current user to use edit/delete button if the current user has posted the message.
if (bmi.MessageUserID == CMS.CMSHelper.CMSContext.CurrentUser.UserID) boardMsgActions.ShowDelete = true;
if (bmi.MessageUserID == CMS.CMSHelper.CMSContext.CurrentUser.UserID) boardMsgActions.ShowEdit = true;
Best regards,
Michal Legen