示例#1
0
def createReportPermissions(app, created_models, verbosity, db=DEFAULT_DB_ALIAS, **kwargs):
  # Create the report permissions for the single menu instance we know about.
  if db == DEFAULT_DB_ALIAS:
    appname = app.__name__.replace(".models","")
    from freppledb.menu import menu
    menu.createReportPermissions(appname)
    from freppledb.common.dashboard import Dashboard
    Dashboard.createWidgetPermissions(appname)
示例#2
0
def createExtraPermissions(sender, using=DEFAULT_DB_ALIAS, **kwargs):
  if using != DEFAULT_DB_ALIAS:
    return
  # Create the report permissions for the single menu instance we know about.
  from freppledb.menu import menu
  menu.createReportPermissions(sender.name)
  # Create widget permissions
  from freppledb.common.dashboard import Dashboard
  Dashboard.createWidgetPermissions(sender.name)
示例#3
0
def createExtraPermissions(sender, using=DEFAULT_DB_ALIAS, **kwargs):
    if using != DEFAULT_DB_ALIAS:
        return
    # Create the report permissions for the single menu instance we know about.
    from freppledb.menu import menu
    menu.createReportPermissions(sender.name)
    # Create widget permissions
    from freppledb.common.dashboard import Dashboard
    Dashboard.createWidgetPermissions(sender.name)
示例#4
0
def createExtraPermissions(app, created_models, verbosity, db=DEFAULT_DB_ALIAS, **kwargs):
  if db != DEFAULT_DB_ALIAS:
    return
  # Create the report permissions for the single menu instance we know about.
  appname = app.__name__.replace(".models", "")
  from freppledb.menu import menu
  menu.createReportPermissions(appname)
  # Create widget permissions
  from freppledb.common.dashboard import Dashboard
  Dashboard.createWidgetPermissions(appname)