#NEWLINE# def auth_required( self , func ) : #NEWLINE# #INDENT# @ functools . wraps ( func ) #NEWLINE# def inner( * args , **kwargs ) : #NEWLINE# #INDENT# user = self . auth . get_logged_in_user ( ) #NEWLINE# if ( not user ) : #NEWLINE# #INDENT# login_url = url_for ( ( '%s.login' % self . auth . blueprint . name ) , next = get_next ( ) ) #NEWLINE# return redirect ( login_url ) #NEWLINE# #UNINDENT# if ( not self . check_user_permission ( user ) ) : #NEWLINE# #INDENT# abort ( 403 ) #NEWLINE# #UNINDENT# return func ( * args , ** kwargs ) #NEWLINE# #UNINDENT# return func