inveniosoftware / invenio-oauthclient

Invenio module that provides OAuth web authorization support.
https://invenio-oauthclient.readthedocs.io
MIT License
6 stars 74 forks source link

global: make it possible to disable "/account/settings" blueprint #173

Closed slint closed 6 years ago

slint commented 6 years ago

Currently invenio_accounts.views.settings.blueprint gets automatically registered (because of the setup.py entrypoint). It should be possible via config to decide this. A temporary workaround is something like:

# ...in your module's init_app
from flask import request
@app.before_request
def disable_account_settings():
    if request.endpoint == 'invenio_accounts.settings':
        abort(404)
slint commented 6 years ago

Accidentally created the issue here. It should be in invenio-accounts: https://github.com/inveniosoftware/invenio-accounts/issues/261