magento-lts
magento-lts copied to clipboard
Allow to copy ACL and config path
Description
A new feature!
Bellow click on the link, and paste the config path where you want! You can disable it from System > Configuration > Admin > Admin theme (admin/design/copy_path).
Tested with Firefox 108, Chrome 108, Opera 94.
navigator.clipboard.writeText require Firefox 63+, Chrome 66+, Edge 79+, Opera 53+, Safari 13.1+ (mdn docs).
1/ Go to System / Configuration:
before/after

2/ Go to System / Web Services / SOAP Roles, add or edit any role:
before/after

3/ Go to System / Permissions / Roles, add or edit any role:
before/after

Warning
Not complete for System / Web Services / REST Roles, I'm not sure how them works.
Contribution checklist
- [x] Pull request has a meaningful description of its purpose
- [x] All commits are accompanied by meaningful commit messages
- [x] All automated tests passed successfully (all builds are green)
- [x] Add yourself to contributors list
I like it, but do we need this in production mode?
Change
Mage::getIsDeveloperMode() || Mage::helper('admin/variable')->isPathAllowed($element->getPath())
to
Mage::getIsDeveloperMode() && Mage::helper('admin/variable')->isPathAllowed($element->getPath())
What do think?
Do we have to adjust openmage-theme (SCSS, CSS) too?
I didn't test with openmage theme.
For production mode, normal admin can use only isPathAllowed in cms blocks, cms pages, wysiwyg products and categories attributes, transactional emails. In dev mode, developers can use all path in PHP files.
There was a module for Magento 1.4-9? that add a red icon
(for default configuration) when configuration is modified by store view. Is someone know where I can find it?
There was a module for Magento 1.4-9? that add a red icon
![]()
(for default configuration) when configuration is modified by store view. Is someone know where I can find it?
I know that extension, but cant find it (was it a hackathon project?) There is a similar one: https://github.com/ericthehacker/magento-configscopehints (and https://github.com/avstudnitz/AvS_ScopeHint).
good idea. Can we put it behind a config value? Iam worried not everyone might like the potentially long extra text. also please change it to the branch for a later version (its a new feature) And I wonder if we should make it more flexible, but thats something for a later iteration
good idea.
- we could also use an icin instead of text
- duplicated js code
javascript:navigator.clipboard.writeTextcould move tocore/jshelper - replace inline style
style="font-style:italicwith css
I think that I have added all comments to the PR (except the red icon). It's not necessary to update openmage theme. Do I need to change the branch to 20?
Think v19 is correct. Will test it later.
Yes? No? To know if I try to add the red mark or not.
So I installed this PR:
But I don't see effects:
Any idea what I miss.
[edit] OOOPs, only for developer mode.
why is this feature behind "developer mode"? I don't see why normal admin shouldn't be able to copy ACLs from a role to another no?
When you are a normal admin user, you can use only allowed config path in email, cms and pages, so this PR display copy links only for allowed config paths.
But it's true that if you are a normal admin user with access to all admin features, you can add any config paths to allowed list.
This PR display all copy links only in dev mode because I supposed that there are useless when you are using the backend as a normal user, not as a dev user.
I've checked out the PR, but the new feature doesn't show up in every section of system/config and in permissions. Also, when clicking, the path is not copied (Firefox)
if i click on config nothing is copied
Nothing appears here:
I've disabled all caches and also re-logged in to the backend
I think https://github.com/OpenMage/magento-lts/pull/3960 will be merged before this one and this one will have to be slightly adjusted, for example using the copy icon and the js functions ;-)
I agree with @fballiano, this PR needs to incorporate what was done in PR #3960.
Yes, but I can't do it for now.