Skip to content

Commit

Permalink
Merge pull request #36 from zopefoundation/petschki_zmi_fix
Browse files Browse the repository at this point in the history
Fix ZMI Templates for Groups/Users/Roles
  • Loading branch information
dataflake committed Apr 4, 2019
2 parents 68e00fd + b2e4665 commit 5e9d106
Show file tree
Hide file tree
Showing 51 changed files with 790 additions and 775 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Change Log
2.0b4 (unreleased)
------------------

- Nothing changed yet.
- Fix ZMI Templates and add ZMI icons for Zope 4
(`#36 <https://github.com/zopefoundation/Products.PluggableAuthService/pull/36>`_)


2.0b3 (2019-03-29)
Expand Down
5 changes: 0 additions & 5 deletions Products/PluggableAuthService/PluggableAuthService.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,6 @@ def _delOb(self, id):
#
# ZMI stuff
#
arrow_right_gif = ImageFile('www/arrow-right.gif', globals())
arrow_left_gif = ImageFile('www/arrow-left.gif', globals())
arrow_up_gif = ImageFile('www/arrow-up.gif', globals())
arrow_down_gif = ImageFile('www/arrow-down.gif', globals())

security.declareProtected(ManageUsers, 'manage_search')
manage_search = PageTemplateFile('www/pasSearch', globals())

Expand Down
1 change: 1 addition & 0 deletions Products/PluggableAuthService/plugins/BasePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class BasePlugin(SimpleItem, PropertyManager):

""" Base class for all PluggableAuthService Plugins
"""
zmi_icon = 'fas fa-puzzle-piece'

security = ClassSecurityInfo()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class ChallengeProtocolChooser(BasePlugin):
""" PAS plugin for choosing challenger protocol based on request
"""
meta_type = 'Challenge Protocol Chooser Plugin'
zmi_icon = 'fas fa-broadcast-tower'

security = ClassSecurityInfo()

Expand Down
1 change: 1 addition & 0 deletions Products/PluggableAuthService/plugins/CookieAuthHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class CookieAuthHelper(Folder, BasePlugin):
""" Multi-plugin for managing details of Cookie Authentication. """

meta_type = 'Cookie Auth Helper'
zmi_icon = 'fas fa-cookie-bite'
cookie_name = '__ginger_snap'
login_path = 'login_form'
security = ClassSecurityInfo()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class DelegatingMultiPlugin(Folder, BasePlugin):
"""
security = ClassSecurityInfo()
meta_type = 'Delegating Multi Plugin'
zmi_icon = 'fas fa-external-link-alt'

manage_options = BasePlugin.manage_options[:1] + Folder.manage_options

Expand Down
1 change: 1 addition & 0 deletions Products/PluggableAuthService/plugins/DomainAuthHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class DomainAuthHelper(BasePlugin):
""" Domain Authentication plugin for the PluggableAuthService """
security = ClassSecurityInfo()
meta_type = 'Domain Authentication Plugin'
zmi_icon = 'fas fa-fingerprint'

security.declareProtected(manage_users, 'manage_map')
manage_map = PageTemplateFile('www/daMatches', globals())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ class DynamicGroupsPlugin(Folder, BasePlugin, Cacheable):
'request' -- the request object.
"""
meta_type = 'Dynamic Groups Plugin'
zmi_icon = 'fas fa-users'

security = ClassSecurityInfo()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class HTTPBasicAuthHelper(BasePlugin):
""" Multi-plugin for managing details of HTTP Basic Authentication.
"""
meta_type = 'HTTP Basic Auth Helper'
zmi_icon = 'fas fa-fingerprint'
security = ClassSecurityInfo()
protocol = "http" # The PAS challenge 'protocol' we use.

Expand Down
1 change: 1 addition & 0 deletions Products/PluggableAuthService/plugins/InlineAuthHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def addInlineAuthHelper(dispatcher, id, title=None, REQUEST=None):
class InlineAuthHelper(Folder, BasePlugin):
""" Multi-plugin for managing details of Inline Authentication. """
meta_type = 'Inline Auth Helper'
zmi_icon = 'fas fa-fingerprint'
security = ClassSecurityInfo()

_properties = ({'id': 'title', 'label': 'Title',
Expand Down
1 change: 1 addition & 0 deletions Products/PluggableAuthService/plugins/LocalRolePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class LocalRolePlugin(BasePlugin):
"""

meta_type = 'Local Role Plugin'
zmi_icon = 'fas fa-user-tag'
security = ClassSecurityInfo()

def __init__(self, id, title=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class RecursiveGroupsPlugin(BasePlugin):
""" PAS plugin for recursively flattening a collection of groups
"""
meta_type = 'Recursive Groups Plugin'
zmi_icon = 'fas fa-users'

security = ClassSecurityInfo()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class RequestTypeSniffer(BasePlugin):
""" PAS plugin for detecting a Request's type
"""
meta_type = 'Request Type Sniffer Plugin'
zmi_icon = 'fas fa-broadcast-tower'

security = ClassSecurityInfo()

Expand Down
1 change: 1 addition & 0 deletions Products/PluggableAuthService/plugins/ScriptablePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class ScriptablePlugin(Folder, BasePlugin):
security = ClassSecurityInfo()

meta_type = 'Scriptable Plugin'
zmi_icon = 'fas fa-cogs'

manage_options = ((Folder.manage_options[0],)
+ ({'label': 'Interfaces',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class SearchPrincipalsPlugin(BasePlugin):
"""
security = ClassSecurityInfo()
meta_type = 'Search Principals Plugin'
zmi_icon = 'fas fa-search'

_properties = ({'id': 'delegate', 'label': ' Delegate Path',
'type': 'string', 'mode': 'w'},)
Expand Down
1 change: 1 addition & 0 deletions Products/PluggableAuthService/plugins/SessionAuthHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def manage_addSessionAuthHelper(dispatcher, id, title=None, REQUEST=None):
class SessionAuthHelper(BasePlugin):
""" Multi-plugin for managing details of Session Authentication. """
meta_type = 'Session Auth Helper'
zmi_icon = 'fas fa-fingerprint'
security = ClassSecurityInfo()

def __init__(self, id, title=None):
Expand Down
1 change: 1 addition & 0 deletions Products/PluggableAuthService/plugins/ZODBGroupManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class ZODBGroupManager(BasePlugin):
""" PAS plugin for managing groups, and groups of groups in the ZODB
"""
meta_type = 'ZODB Group Manager'
zmi_icon = 'fas fa-users'

security = ClassSecurityInfo()

Expand Down
1 change: 1 addition & 0 deletions Products/PluggableAuthService/plugins/ZODBRoleManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class ZODBRoleManager(BasePlugin):
""" PAS plugin for managing roles in the ZODB.
"""
meta_type = 'ZODB Role Manager'
zmi_icon = 'fas fa-user-tag'

security = ClassSecurityInfo()

Expand Down
1 change: 1 addition & 0 deletions Products/PluggableAuthService/plugins/ZODBUserManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class ZODBUserManager(BasePlugin, Cacheable):
"""

meta_type = 'ZODB User Manager'
zmi_icon = 'fas fa-user'

security = ClassSecurityInfo()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<h1 tal:replace="structure here/manage_page_header">Header</h1>
<h2 tal:replace="structure here/manage_tabs"> TABS </h2>

<main class="container-fluid">

<p class="form-help">
Choose the functionality this
<span tal:replace="here/meta_type"> Foo Plugin </span>
Expand Down Expand Up @@ -32,17 +34,15 @@
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value=" Update " />
</div>
<td>
<input class="btn btn-primary" type="submit" name="submit"
value=" Update " />
</td>
</tr>
</table>
</form>

</main>

<h1 tal:replace="structure here/manage_page_footer">Footer</h1>

22 changes: 13 additions & 9 deletions Products/PluggableAuthService/plugins/www/caAdd.zpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<h1 tal:replace="structure here/manage_page_header">Header</h1>

<main class="container-fluid">

<h2 tal:define="form_title string:Add Cookie Auth Helper"
tal:replace="structure here/manage_form_title">Form Title</h2>

Expand All @@ -10,41 +12,41 @@ Pluggable Auth Service functionality.

<form action="addCookieAuthHelper" method="post"
enctype="multipart/form-data">
<table cellspacing="0" cellpadding="2" border="0">
<table class="table table-sm">
<tr>
<td align="left" valign="top">
<td>
<div class="form-label">
Id
</div>
</td>
<td align="left" valign="top">
<td>
<input type="text" name="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<td>
<div class="form-optional">
Title
</div>
</td>
<td align="left" valign="top">
<td>
<input type="text" name="title" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<td>
<div class="form-optional">
Cookie Name
</div>
</td>
<td align="left" valign="top">
<td>
<input type="text" name="cookie_name" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<td>
</td>
<td align="left" valign="top">
<td>
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value=" Add " />
Expand All @@ -54,4 +56,6 @@ Pluggable Auth Service functionality.
</table>
</form>

</main>

<h1 tal:replace="structure here/manage_page_footer">Footer</h1>
19 changes: 11 additions & 8 deletions Products/PluggableAuthService/plugins/www/cpcAdd.zpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<h1 tal:replace="structure here/manage_page_header">Header</h1>
<h1 tal:replace="structure here/manage_tabs">Tabs</h1>

<main class="container-fluid">

<h2 tal:define="form_title string:Add a Challenge Protocol Chooser Plugin"
tal:replace="structure here/manage_form_title">Form Title</h2>
Expand All @@ -12,31 +13,31 @@ challenge based on the incoming request.

<form action="addChallengeProtocolChooserPlugin" method="post"
enctype="multipart/form-data">
<table cellspacing="0" cellpadding="2" border="0">
<table class="table table-sm">
<tr>
<td align="left" valign="top">
<td>
<div class="form-label">
Id
</div>
</td>
<td align="left" valign="top">
<td>
<input type="text" name="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<td>
<div class="form-optional">
Title
</div>
</td>
<td align="left" valign="top">
<td>
<input type="text" name="title" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<td>
</td>
<td align="left" valign="top">
<td>
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value=" Add " />
Expand All @@ -46,4 +47,6 @@ challenge based on the incoming request.
</table>
</form>

</main>

<h1 tal:replace="structure here/manage_page_footer">Footer</h1>

0 comments on commit 5e9d106

Please sign in to comment.