-
-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.x] Refine grids code to correct actions access and visibility #15915
Conversation
Thank you for your work, but I have to criticize you, do not be offended :)
In any case, thanks for your participation! |
@Ruslan-Aleev - No offense taken. Maybe additional explanation is needed as well. In response to your comments:
Look forward to continuing the dialog... |
Anyway, I would recommend that you simplify your PR. If in the process of work you find an error, then it is better to create an issue and come back to it later. Otherwise, be prepared for the fact that your PRs will not be tested for a long time and will not be merged, due to the fact that there are not enough people for tests. |
I've re-submitted a cleaner version of this PR (see #15919). |
NOTE: This is really a draft PR, although I'd like one of the code owners to do a review for (hopefully) initial approval to proceed further (which is why I've not tagged it as a draft yet).
What does it do?
This draft PR initially set out to fix issues raised in #14929, which uncovered other problems in the grids UI. There are quite a few loose ends there in terms of reflecting what a user can do according to their group permissions and object-level access policies (when applied [to contexts, media sources, etc.]). Additionally there's a lack of full validation within some grids, including their create forms. Also, as @Ruslan-Aleev points out in #15281, validation response is inconsistent because the proper specification is missing on the js side of things. I've arrived at the solution you'll see by creating a number of methods and properties in the main grid class (modx.grid.js), as well as an updated way to identify/apply permissions in the child grid classes and their respective GetList processors.
Fixes
blankText
config to required fields)Proposed Enhancements Included
$colorSplash
)How to test
Note that while I have applied some of my changes to a couple other grids, their implementation may be incomplete. The three grids to test for this draft are:
Process
grunt build
to ensure css is updated.As those of you who actually coded these areas of MODX or are very familiar with their inner workings, this is a necessarily highly tedious process. I'm hoping at least a couple of decision makers have the time to dive in to playing with this draft, as there are quite a few grids to go through to fully implement these changes (assuming they get the green light). I'd envision doing this across multiple PRs so small logical batches could be tested and put into place over time (as short a time as possible).