Example #1
0
 def decorated_view(*args, **kwargs):
     if not is_super_user(g.user['user_id']):
         flash(u'Only super users can access this feature', 'error')
         return redirect(url_for('index.show_home'))
     return f(*args, **kwargs)
Example #2
0
 def jinja_super_user_check(user_id):
     return is_super_user(user_id)