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)
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.
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)
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
is working on a reply...