Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Henk Boelman 3 posts 121 karma points MVP 6x c-trib
    Apr 23, 2013 @ 13:51
    Henk Boelman
    0

    Changing the message "The current user doesn't have permissions to edit this document. Please contact the system administrator."

    I was wondering if there is a way to change the message
    "The current user doesn't have permissions to edit this document. Please contact the system administrator."

    This message appears when a user doen't have access on a node in the umbraco cms (4.11.6)

  • Michael Westgate 11 posts 31 karma points
    Apr 26, 2013 @ 12:49
    Michael Westgate
    0

    Usually you would edit these types of strings by browsing the \\Umbraco\Config\Lang directory and editing the appropriate language XML file. Nice and clean stuff.

    Unfortunately, in this case, I pulled the source code and found the gem you are looking for in \\src\Umbraco.Web\umbraco.presentation\umbraco\editContent.aspx.cs, line 458:

    //TODO: Change this, when we add view capabilities, the user will be able to view but not edit!
    if (!base.ValidateUserNodeTreePermissions(_document.Path, ActionUpdate.Instance.Letter.ToString()))
    {
            ShowUserValidationError("The current user doesn't have permissions to edit this document. Please contact the system administrator.");
             return false;
    }
    return true;

    So yes, there is a way to change this string. Pull the source code, update it, compile it, and use the new compiled bin in your project.

    Should you do this? Not sure. You need to consider how you would handle upgrades. Each time you upgraded you would need to make the change again and release your own updated bin.

    Michael

Please Sign in or register to post replies

Write your reply to:

Draft