def restrict(permission):
 def decorator(fx):
  def wrapper(*args, **kwargs):
   UserManager.get().require_permission(extract_context(), permission)
   return fx(*args, **kwargs)
  return wrapper
 return decorator

def restrict ( permission ) : def decorator ( fx ) : def wrapper ( * args , ** kwargs ) : UserManager . get ( ) . require_permission ( extract_context ( ) , permission ) return fx ( * args , ** kwargs ) return wrapper return decorator
restricts the dataset to use the specified fold .