-
☆ A M B ☆
- 24,524 Posts
Trying to duplicate a chunk, get this:
Chunk doesn’t exist.
in an otherwise empty right frame. However, the chunk is actually there, and shows up nicely after reloading the Resources frame. Rev 1822.
Duplicating a snippet produced this
Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/jewishyou/manager/includes/header.inc.php:18) in /Applications/MAMP/htdocs/jewishyou/manager/actions/mutate_snippet.dynamic.php on line 51
and a normal empty new snippet form.
Contexts sound good; it sounds like Template Switcher works but we should point out somewhere that it is not compatible with caching and therefore shouldn’t be used on heavy sites. Multiple templates do make sense as multiple contexts, and I’m pleased to see caching is on a per-context basis. Future looks good.
I am now sold on "Close Doc Manager" not being changed to "Cancel" because that would get confused with "Undo", but I still think removing the link makes sense. I guess what both buttons say is "Exit Without Saving Anything That Hasn’t Already Been Saved".
This brings us to permissions - I’ve completed a review of the menu permissions vs what permissions are required to run the action.
The Module list screen can be viewed (with limited functionality) by people with only Exec permissions, but the menu doesn’t let them see it. I guess that might be confusing as they can only get there by clicking Close Doc Manager, but this probably isn’t a big deal.
The other screen where the menu is potentially hiding things that a user can actually see is Manage Resources - because the new Combined View subscreen includes modules, if someone has the ability to edit modules but not snippets, they could in theory see the modules sorted by category.
While improving the logic of menu.php, I have left both of these as they are.
What I *have* changed in light of the review is to not show page links if they aren’t actually usable, so:
WAS:
IF ’new_user’ OR ’edit_user’ { * * user_management_title }
IF ’new_web_user’ OR ’edit_web_user’ { * * web_user_management_title }
IF ’new_role’ OR ’edit_user’ { * * role_management_title }
NOW:
IF ’edit_user’ { * * user_management_title }
IF ’edit_web_user’ { * * web_user_management_title }
IF ’edit_user’ { * * role_management_title }
Also, one minor error in the original allocation of permissions:
IF ’settings’ { * * view_sysinfo }
now
IF ’logs’ { * * view_sysinfo }
The menus are now, as per TobyL’s suggestion, built by collecting together the menu lines and outputting menus where they’re not empty.
We still haven’t actually improved the Import / Export permissions, but as the new method adds the lines in PHP it is now much easier to comment out menu items that you want to omit, as the menu will automatically disappear.
I’m posting the new file here because I can’t access my branch where I am now, and it’s just easier. If people could test it, particularly with different sets of permissions, that would be nice. (.txt added so I can post it here). Works fine for me.
Next, languages...
-
MODX Staff
- 1,535 Posts
Okay, menu.php update along with the additional ’new document’ permission wrappers committed to my personal branch in SVN as commit #1838 - ready to merge with trunk.
update: done
Garry Nutting
Senior Developer
MODX, LLC
Email:
[email protected]
Twitter: @garryn
Web: modx.com
-
☆ A M B ☆
- 24,524 Posts
I returned my branch to the original files for document.parser.class.inc.php and save_content.processor.php since the business with document ID in the content of a weblink needs to be handled by the snippet if it uses the content for making a link. The makeUrl still needs to be called in the parser if a weblink document is loaded for parsing by a snippet, such as DropMenu. Wayfinder, which uses the content of a weblink to generate the link, will have to have its own makeUrl call.
The addition to the installer, clearing locks on the manager, is still in my branch.
update: in as of 1854, or thereabouts
Very good idea. Doing it the other way around is sure to cause people grief and confusion.
Addressed in 1858