def deco(*a, **b): if not TvbProfile.is_first_run(): return func(*a, **b) raise common.NotAllowed('You should first set up tvb', redirect_url='/settings/settings')
def deco(*a, **b): if hasattr(cherrypy, common.KEY_SESSION): if common.KEY_PROJECT in cherrypy.session: return func(*a, **b) raise common.NotAllowed('You should first select a Project!', redirect_url='/project/viewall')