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

Inherit all IAuthenticator methods #59

Merged

Conversation

amercader
Copy link
Contributor

Otherwise when using the plugins and one of the not implemented methods
is called we get an exception instead of the actual error:

  File "/usr/lib/python3.8/site-packages/flask/views.py", line 163, in dispatch_request
    return meth(*args, **kwargs)
  File "/srv/app/src_extensions/ckan/ckan/views/dataset.py", line 740, in post
    return base.abort(403, _(u'Unauthorized to read package %s') % id)
  File "/srv/app/src_extensions/ckan/ckan/lib/base.py", line 59, in abort
    result = item.abort(status_code, detail, headers, comment)
AttributeError: 'Saml2AuthPlugin' object has no attribute 'abort'

Otherwise when using the plugins and one of the not implemented methods
is called we get an exception instead of the actual error:

  File "/usr/lib/python3.8/site-packages/flask/views.py", line 163, in dispatch_request
    return meth(*args, **kwargs)
  File "/srv/app/src_extensions/ckan/ckan/views/dataset.py", line 740, in post
    return base.abort(403, _(u'Unauthorized to read package %s') % id)
  File "/srv/app/src_extensions/ckan/ckan/lib/base.py", line 59, in abort
    result = item.abort(status_code, detail, headers, comment)
AttributeError: 'Saml2AuthPlugin' object has no attribute 'abort'
Copy link
Member

@duskobogdanovski duskobogdanovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@duskobogdanovski duskobogdanovski merged commit 4c70955 into keitaroinc:main Oct 5, 2021
@avdata99 avdata99 deleted the inherit-iauthenticator-methods branch July 31, 2024 18:27
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