Skip to content

Commit

Permalink
Merge branch 'release/0.5.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
mblomdahl committed Nov 2, 2017
2 parents 4b1d5a6 + 66478fd commit 9d41690
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 3 deletions.
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,13 @@ DB Models
Changelog
=========

v. 0.5.3
--------

* Add collection name to ``/oauth/verify`` response
* Fix broken database migration (`#68 <https://github.com/libris/xl_auth/issues/68>`_)


v. 0.5.2
--------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

def upgrade():
"""Re-create tables 'clients', 'grants' and 'tokens'."""
op.drop_table('clients')
op.drop_table('tokens')
op.drop_table('grants')
op.drop_table('clients')

op.create_table(
'clients',
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xl_auth",
"version": "0.5.2",
"version": "0.5.3",
"author": "National Library of Sweden",
"license": "Apache-2.0",
"description": "OAuth2 authorization for LibrisXL, replacing BibDB counterpart",
Expand Down
2 changes: 2 additions & 0 deletions tests/end2end/test_oauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ def test_verify_success_response(token, testapp):
if permission['code'] == permission1.collection.code:
assert permission['registrant'] is True
assert permission['cataloger'] is False
assert permission['friendly_name'] == permission1.collection.friendly_name
if permission['code'] == permission2.collection.code:
assert permission['registrant'] is False
assert permission['cataloger'] is True
assert permission['friendly_name'] == permission2.collection.friendly_name


def test_verify_without_bearer(testapp):
Expand Down
1 change: 1 addition & 0 deletions xl_auth/oauth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ def verify():
'full_name': oauth.user.full_name,
'email': oauth.user.email,
'permissions': [{'code': permission.collection.code,
'friendly_name': permission.collection.friendly_name,
'cataloger': permission.cataloger,
'registrant': permission.registrant}
for permission in oauth.user.permissions]
Expand Down
1 change: 1 addition & 0 deletions xl_auth/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Config(object):
APP_NAME = __name__
APP_VERSION = __version__
APP_AUTHOR = __author__
JSON_AS_ASCII = False
SECRET_KEY = os.environ.get('XL_AUTH_SECRET', 'secret-key') # TODO: Change me
APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory.
PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir))
Expand Down

0 comments on commit 9d41690

Please sign in to comment.