<s> from functools import wraps <EOL> from flask import abort <EOL> from flask . ext . login import current_user <EOL> def admin_required ( f ) : <EOL> @ wraps ( f ) <EOL> def decorated_function ( * args , ** kwargs ) : <EOL> if not current_user . is_admin ( ) : <EOL> abort ( <NUM_LIT> ) <EOL> return f ( * args , ** kwargs ) <EOL> return decorated_function </s>
