How to modify a validation message set thru the object permission with the custom one?
I want to replace the usual message
"You do not have permission to add an entry in the "<>" table"
with,
"You do not have permission to add a file in this tab"
Like
1 comments
15:02 Nov 24, 2021
It's not possible since this message is returned by the GetCanEdit method from RightsService class from this part of code:
if (isNew) {
bool canAppend = (rightLevels & SchemaOperationRightLevels.CanAppend) == SchemaOperationRightLevels.CanAppend;
return rightsHelper.GetCanAppendSchemaOperationRight(schemaName)
? string.Empty
: (canAppend
? string.Format(new LocalizableString("Terrasoft.Core", "Entity.Exception.NoRightFor.Insert"), schema.Caption.Value)
: string.Format(new LocalizableString("Terrasoft.Core", "LicHelper.Exception.LicenceNotFound")));
}And the string is formed using the core entity exception.
Show all comments