def load(self): usr = self.request.current_user level_u = UserSettingHelper(usr) level_u_ = level_u.load() level_s = AppSettingHelper.load() level_all = dict(level_u_, **level_s) return level_all
def init(): AppSettingHelper.load() #Create Root Category helper = CategoryHelper("ROOT") if not helper.exists("ROOT"): helper.create("ROOT") role_id = Loader.create_super_role() if not role_id: return Loader.create_root_account(role_id) Loader.create_base_securitypoints() Loader.assign_points_to_superadmin(role_id) #自定义加载 for cls in ObjectPool.server_starups: obj = cls() if hasattr(obj, "load"): obj.load()