This is a migrated thread and some comments may be shown as answers.

Only edit/delete comments authored by the current user

2 Answers 48 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 02 May 2013, 10:08 PM
Hi, I'm currently investigating using the RadEditor for a project at work, and I am trying to figure out if it is possible to set up the editor so that the current author (set programmatically from the database) can only edit/delete their own comments.  I have gone through google, but the word "comment" appears on just about every page on the internet, so I have not had any luck in figuring out how to do this.

Thanks,

Paul Griffin

2 Answers, 1 is accepted

Sort by
0
Niko
Telerik team
answered on 07 May 2013, 03:51 PM
Hello Paul,

Unfortunately there is no such built-in functionality. Still you can work around this limitation by handling the OnClientSelectionChange event of the Editor and always disable the respective tool button. Here is a sample implementation of the event handler:
function disableComments(editor, args)
{
    setTimeout(function() {
        editor.get_toolAdapter().getToolByName("RemoveComment").set_enabled(false);
    });
}

Hope this helps.

Kind regards,
Niko
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Paul
Top achievements
Rank 1
answered on 07 May 2013, 08:04 PM
Thanks for the reply, I think we will be able to get this to work for our project.

-Paul Griffin
Tags
Editor
Asked by
Paul
Top achievements
Rank 1
Answers by
Niko
Telerik team
Paul
Top achievements
Rank 1
Share this question
or