Selaa lähdekoodia

[oozie] Do not generate action credentials when security is not set

Romain Rigaux 10 vuotta sitten
vanhempi
commit
e028f90

+ 1 - 1
apps/oozie/src/oozie/templates/editor2/gen/workflow.xml.mako

@@ -29,7 +29,7 @@
     % endif
   </global>
   % endif
-  % if wf.credentials:
+  % if wf.credentials and mapping.get('security_enabled'):
   <credentials>
     % for cred_type in wf.credentials:
     <%

+ 2 - 0
desktop/libs/liboozie/src/liboozie/submission2.py

@@ -61,6 +61,8 @@ class Submission(object):
     else:
       self.properties = {}
 
+    self.properties['security_enabled'] = self.api.security_enabled
+
   def __str__(self):
     if self.oozie_id:
       res = "Submission for job '%s'." % (self.oozie_id,)