Exemple #1
0
def init_app(app, **kwargs):
    # pylint: disable=unused-argument
    """
    Init email module.
    """
    # Register OAuth scopes
    api_v1.add_oauth_scope('emails:read', 'Provide access to email details')
    api_v1.add_oauth_scope('emails:write',
                           'Provide write access to email details')

    # Touch underlying modules
    from . import models  # pylint: disable=unused-import  # NOQA
Exemple #2
0
def init_app(app, **kwargs):
    # pylint: disable=unused-argument,unused-import
    """
    Init teams module.
    """
    api_v1.add_oauth_scope('jira_filter:read', "Provide access to JIRA Filter details")
    api_v1.add_oauth_scope('jira_filter:write', "Provide write access to JIRA Filter details")

    # Touch underlying modules
    from . import models, resources

    api_v1.add_namespace(resources.api)
def init_app(app, **kwargs):
    # pylint: disable=unused-argument,unused-variable
    """
    Init users module.
    """
    api_v1.add_oauth_scope('users:read', "Provide access to user details")
    api_v1.add_oauth_scope('users:write', "Provide write access to user details")

    # Touch underlying modules
    from . import models, resources

    api_v1.add_namespace(resources.api)
def init_app(app, **kwargs):
    # pylint: disable=unused-argument,unused-variable
    """
    Init users module.
    """
    api_v1.add_oauth_scope('users:read', "Provide access to user details")
    api_v1.add_oauth_scope('users:write', "Provide write access to user details")

    # Touch underlying modules
    from . import models, resources  # pylint: disable=unused-import

    api_v1.add_namespace(resources.api)
Exemple #5
0
def init_app(app, **kwargs):
    # pylint: disable=unused-argument,unused-variable
    """
    Init Projects module.
    """
    api_v1.add_oauth_scope('projects:read', 'Provide access to Projects details')
    api_v1.add_oauth_scope('projects:write', 'Provide write access to Projects details')

    # Touch underlying modules
    from . import models, resources  # NOQA

    api_v1.add_namespace(resources.api)
Exemple #6
0
def init_app(app, **kwargs):
    # pylint: disable=unused-argument,unused-import
    """
    Init Image module.
    """
    api_v1.add_oauth_scope('image:read', "Provide access to get image data")
    api_v1.add_oauth_scope('image:write',
                           "Provide write access to upload image")

    # Touch underlying modules
    from . import resources

    api_v1.add_namespace(resources.api)
Exemple #7
0
def init_app(app, **kwargs):
    # pylint: disable=unused-argument,unused-import
    """
    Init Analysis module.
    """
    api_v1.add_oauth_scope('analysis:read',
                           "Provide access to analysis result details")
    api_v1.add_oauth_scope('analysis:write',
                           "Provide write access to analysis result details")

    # Touch underlying modules
    from . import models, resources

    api_v1.add_namespace(resources.api)
Exemple #8
0
def init_app(app, **kwargs):
    # pylint: disable=unused-argument,unused-variable
    """
    Init Passthroughs module.
    """
    api_v1.add_oauth_scope('passthroughs:read',
                           'Provide access to EDM and ACM passthroughs')
    api_v1.add_oauth_scope('passthroughs:write',
                           'Provide write access to EDM and ACM passthroughs')

    # Touch underlying modules
    from . import resources  # NOQA

    api_v1.add_namespace(resources.edm_pass)
Exemple #9
0
def init_app(app, **kwargs):
    # pylint: disable=unused-argument,unused-variable
    """
    Init Configuration module.
    """
    api_v1.add_oauth_scope('configuration:read',
                           'Provide access to (EDM) configuration')
    api_v1.add_oauth_scope('configuration:write',
                           'Provide write access to (EDM) configuration')

    # Touch underlying modules
    from . import resources  # NOQA

    api_v1.add_namespace(resources.edm_configuration)
    api_v1.add_namespace(resources.edm_configurationDefinition)
Exemple #10
0
def init_app(app, **kwargs):
    # pylint: disable=unused-argument
    """
    Init auth module.
    """
    # Register OAuth scopes
    api_v1.add_oauth_scope('auth:read', 'Provide access to auth details')
    api_v1.add_oauth_scope('auth:write',
                           'Provide write access to auth details')

    # Touch underlying modules
    from . import models, views, resources  # pylint: disable=unused-import  # NOQA

    # Mount authentication routes
    api_v1.add_namespace(resources.api)
Exemple #11
0
def init_app(app, **kwargs):
    # pylint: disable=unused-argument
    """
    Config extension initialization point.
    """
    api_v1.add_oauth_scope('config.houston:read',
                           'Provide access to database configurations')
    api_v1.add_oauth_scope('config.houston:write',
                           'Provide write access to database configurations')

    # Touch underlying modules
    from . import models, resources  # NOQA

    api_v1.add_namespace(resources.api)

    with app.app_context():
        app.config.initialize(app)
def init_app(app, **kwargs):
    # pylint: disable=unused-argument
    """
    Init auth module.
    """
    # Bind Flask-Login for current_user
    login_manager.request_loader(load_user_from_request)

    # Register OAuth scopes
    api_v1.add_oauth_scope('auth:read', "Provide access to auth details")
    api_v1.add_oauth_scope('auth:write', "Provide write access to auth details")

    # Touch underlying modules
    from . import models, views, resources  # pylint: disable=unused-variable

    # Mount authentication routes
    app.register_blueprint(views.auth_blueprint)
    api_v1.add_namespace(resources.api)
Exemple #13
0
def init_app(app, **kwargs):
    # pylint: disable=unused-argument
    """
    Init auth module.
    """
    # Bind Flask-Login for current_user

    # Register OAuth scopes
    api_v1.add_oauth_scope('auth:read', "Provide access to auth details")
    api_v1.add_oauth_scope('auth:write',
                           "Provide write access to auth details")

    # Touch underlying modules
    from . import models, views, resources  # pylint: disable=unused-variable

    # Mount authentication routes
    app.register_blueprint(views.auth_blueprint)
    api_v1.add_namespace(resources.api)
Exemple #14
0
def init_app(app, **kwargs):
    # pylint: disable=unused-argument
    """
    Init front-end module.
    """
    api_v1.add_oauth_scope('frontends:read',
                           'Provide access to Frontend details')
    api_v1.add_oauth_scope('frontends:write',
                           'Provide write access to Frontend details')

    # Touch underlying modules
    from . import views_backend, views_frontend, views_documentation

    # Mount front-end routes
    app.register_blueprint(views_frontend.frontend_blueprint)

    app.register_blueprint(views_backend.backend_blueprint)

    app.register_blueprint(views_documentation.documentation_blueprint)

    from . import resources  # NOQA

    api_v1.add_namespace(resources.api)