Skip to content
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

Publishing ZMI CSS/JS-Resources #273

Merged
merged 3 commits into from
Apr 30, 2024
Merged

Publishing ZMI CSS/JS-Resources #273

merged 3 commits into from
Apr 30, 2024

Conversation

drfho
Copy link
Contributor

@drfho drfho commented Apr 29, 2024

Added a ZCML snippet to ZMS-configure.zcml for publishing ZMI CSS/JS-resources.

Since zopefoundation/Zope#1166 general GUI resources are not public anymore but limited to the ViewManagementScreensPermission. If using bootstrap.css or fontawesome for the website-design, these resources can get accessed by changing its permisson by adding the path to a overrides.zcml for ZMS:

<browser:resourceDirectory
      name="zmi"
      directory="~/virtualenv_demo/src/zope/src/zmi/styles/resources"
      permission="zope.Public" />

overrides.zip

The directory-directive has to be adopted to the local installation path (this is not convenient!).

A late Zope-PR zopefoundation/Zope#1204 may have removed the permission to any non-manage-user; thus the upper enhancement is not only needed for 3rd-view but for ZMSEditor etc. accessing ZMS-ZMI.
Actually this is a litle bit too complicated; any other ideas?
I doubt that adding the ViewManagementScreen-permission to the ZMS*-roles (except Subscriber) is a good solution, because the user should work in ZMS-ZMI and not Zope-ZMI.

ZMI Access Error
image

@drfho drfho requested a review from zmsdev April 29, 2024 12:25
@drfho
Copy link
Contributor Author

drfho commented Apr 30, 2024

Now, the permission "View management screens" is added to the basic ZMSRoles for getting access to Zope-ZMI-Assets implicitly.

IMPORTANT: this only works if a new ZMS-objects is added into th Zope-object-tree. For existing ZMS-instances the new permission has to be added manually with ./manage_access:

Screen image of ./manage_access-GUI add permissions "View management screens" to ZMSEditor, ZMSAuthor and ZMSUserAdministrator:
view_management_screens

@drfho drfho merged commit 821bb22 into main Apr 30, 2024
13 checks passed
@zmsdev zmsdev deleted the fb_publish_zmi_resources branch June 17, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants