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)
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)
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)