def check_action_access_permission(view_func):
 def decorate(request, *args, **kwargs):
  action_id = kwargs.get('action')
  action = Node.objects.get(id=action_id).get_full_node()
  Job.objects.can_read_or_exception(request, action.workflow.id)
  kwargs['action'] = action
  return view_func(request, *args, **kwargs)
 return wraps(view_func)(decorate)

def check_action_access_permission ( view_func ) : def decorate ( request , * args , ** kwargs ) : action_id = kwargs . get ( 'action' ) action = Node . objects . get ( id = action_id ) . get_full_node ( ) Job . objects . can_read_or_exception ( request , action . workflow . id ) kwargs [ 'action' ] = action return view_func ( request , * args , ** kwargs ) return wraps ( view_func ) ( decorate )
decorator ensuring that the user has access to the workflow action .