def check_dataset_edition_permission(authorize_get=False):
 def inner(view_func):
  def decorate(request, *args, **kwargs):
   dataset = kwargs.get('dataset')
   if ((dataset is not None) and (not (authorize_get and (request.method == 'GET')))):
    Job.objects.can_edit_or_exception(request, dataset.coordinator)
   return view_func(request, *args, **kwargs)
  return wraps(view_func)(decorate)
 return inner

def check_dataset_edition_permission ( authorize_get = False ) : def inner ( view_func ) : def decorate ( request , * args , ** kwargs ) : dataset = kwargs . get ( 'dataset' ) if ( ( dataset is not None ) and ( not ( authorize_get and ( request . method == 'GET' ) ) ) ) : Job . objects . can_edit_or_exception ( request , dataset . coordinator ) return view_func ( request , * args , ** kwargs ) return wraps ( view_func ) ( decorate ) return inner
decorator ensuring that the user has the permissions to modify a dataset .