def data_profiling_required(f):
 @wraps(f)
 def decorated_function(*args, **kwargs):
  if (current_app.config['LOGIN_DISABLED'] or ((not current_user.is_anonymous()) and current_user.data_profiling())):
   return f(*args, **kwargs)
  else:
   flash('This page requires data profiling privileges', 'error')
   return redirect(url_for('admin.index'))
 return decorated_function

def data_profiling_required ( f ) : @ wraps ( f ) def decorated_function ( * args , ** kwargs ) : if ( current_app . config [ 'LOGIN_DISABLED' ] or ( ( not current_user . is_anonymous ( ) ) and current_user . data_profiling ( ) ) ) : return f ( * args , ** kwargs ) else : flash ( 'This page requires data profiling privileges' , 'error' ) return redirect ( url_for ( 'admin.index' ) ) return decorated_function
decorator for views requiring data profiling access .