Uploaded image for project: 'Hue'
  1. Hue
  2. HUE-5408

[oozie] Cannot Save Shared Workflow in New Editor

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.10.0
    • Fix Version/s: 3.12.0
    • Component/s: core.users
    • Labels:
      None

      Description

      • Share an Oozie workflow with someone
      • Log in as the shared user
      • Assuming you have HUE-5028 applied already the save button appears
      • Press the save button

      Result:
      Exception occurs as the new editor is trying to update the old model

      During fixing issues with sharing workflows & coordinators we found new bug during saving shared workflow.

      /hue/blob/master/apps/oozie/src/oozie/decorators.py:
      
      def check_document_modify_permission():
      def inner(view_func):
      def decorate(request, *args, **kwargs):
      doc_id = None
      
      job = json.loads(request.POST.get('workflow', '{}'))
      .....
      try:
      doc2 = Document2.objects.get(id=job['id'])
      doc2.doc.get().can_write_or_exception(request.user)
      

      last check will perform check in "Document" namespace wich is inconsistent/incorrect with NEW_EDITOR.
      Should be:

      /hue/blob/master/apps/oozie/src/oozie/decorators.py:
      
      try:
      doc2 = Document2.objects.get(id=job['id'])
      if USE_NEW_EDITOR.get():
      doc2.can_write_or_exception(request.user)
      else:
      doc2.doc.get().can_write_or_exception(request.user)
      
      

        Attachments

          Activity

            People

            • Assignee:
              yuriyhupalo yuriy hupalo
              Reporter:
              ivajnorak Istvan Vajnorak
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: