Skip to content

Commit

Permalink
Allow installation of plone.restapi if JWT plugin already exists
Browse files Browse the repository at this point in the history
Fixes #119
  • Loading branch information
buchi committed Jan 12, 2017
1 parent df7d2ad commit c51a347
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ New Features:
- Add simple user search capabilities in the GET @users endpoint.
[sneridagh]

Bugfixes:

- Allow installation of plone.restapi if JWT plugin already exists. This fixes
https://github.com/plone/plone.restapi/issues/119.
[buchi]


1.0a7 (2016-12-05)
------------------
Expand Down
2 changes: 2 additions & 0 deletions src/plone/restapi/setuphandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

def install_pas_plugin(context):
uf = getToolByName(context, 'acl_users')
if 'jwt_auth' in uf:
return
plugin = JWTAuthenticationPlugin('jwt_auth')
uf._setObject(plugin.getId(), plugin)
plugin = uf['jwt_auth']
Expand Down

0 comments on commit c51a347

Please sign in to comment.