示例#1
0
文件: app.py 项目: Smotko/ggrc-core
def init_permissions_provider():
  from ggrc.rbac import permissions
  permissions.get_permissions_provider()
示例#2
0
def init_permissions_provider():
    from ggrc.rbac import permissions
    permissions.get_permissions_provider()
示例#3
0
# Initialize views
import ggrc.views
ggrc.views.init_all_object_views(app)

# Initialize extension blueprints
for extension in settings.EXTENSIONS:
  __import__(extension)
  extension_module = sys.modules[extension]
  if hasattr(extension_module, 'blueprint'):
    app.register_blueprint(extension_module.blueprint)

# Initialize configured and default extensions
from ggrc.fulltext import get_indexer
ggrc.indexer = get_indexer()

from ggrc.rbac import permissions
permissions.get_permissions_provider()

if settings.ENABLE_JASMINE:
  # Configure Flask-Jasmine, for dev mode unit testing
  from flask.ext.jasmine import Jasmine, Asset
  jasmine = Jasmine(app)

  jasmine.sources(
      Asset("dashboard-js"),
      Asset("dashboard-js-spec-helpers"))

  jasmine.specs(
      Asset("dashboard-js-specs"))