Prevent users from "Editing anyway"

Vote:
 

If a page is being edited by one user, another user is told that page is being edited. 

However, they can opt to "Edit anyway"..

is there a way to prevent users from doing this?

#81710
Feb 24, 2014 16:18
Vote:
 

Unfortunately, there is no easy way to accomplish this. As usual, if there is a will there is a way, but there is nothing supported or some way that I can think of that does not require quite an effort.

#81782
Feb 26, 2014 13:26
Vote:
 

Thanks Linus:

My only thoughts on this is finding the correct UI file or JavaScript file to edit, and write some JavaScript to just "hide" it..

I have written something, but just can't find which file I should edit (I think it’s somewhere inside appdata\Modules, but whatever I edit doesn't seem to affect what I view..

 

I'm wanting to run

$(".dijitReset.epi-tooltipDialogMenu.epi-menuInverted tr:last").hide(); (or a pure JavaScript equivalent)

 

The above hides the button when run in the console.

I added to one of pages, but it doesn't work, as the page loaded inside an iFrame, so separate to the rest of the UI...

Any tips?

#81786
Feb 26, 2014 13:45
Vote:
 

The UI and the site runs in different frames. If you want to execute JavaScript in the UI layer you need to create a shell module that starts your script. There is a module in the Alloy sample packages. This blog post describes how to set up an initialization module on the client:

http://world.episerver.com/Blogs/Linus-Ekstrom/Dates/2012/11/Creating-a-more-advanced-property-editor/

Add the following configuration under the clientModule section in your module config file to run this module automatically after the CMS module:

<moduleDependencies>
<add dependency="CMS" type="RunAfter" />
</moduleDependencies>

#83206
Mar 27, 2014 14:23
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.