-
-
Notifications
You must be signed in to change notification settings - Fork 530
Description
Bug report
Summary
ACL can give an incorrect error message, for example, this.
It is already not very clear to the end user what exactly the ACL error is.
But if the manager panel is not in english, then json displays messages in incorrect encoding, i.e. it is not even clear that the error is related to ACL.
It also makes sense to display specific information in window, for example, the permission that is required (view_template
, list_template
etc).
Potential solution
Use second parameter for json_encode
(available as of php 5.4) to avoid encoding problems:
json_encode($data, JSON_UNESCAPED_UNICODE);
Step to reproduce
Change the language in the manager panel, for example, to russian. Create a user with access policy with view_template
disabled in the policy template and try to edit resource.
Expected behavior
Display readable messages.
Related issue(s)/PR(s)
#14506 (Error Messages)
Environment
MODX 2.x>