def CheckFlowCanBeStartedAsGlobal(flow_name):
 flow_cls = flow.GRRFlow.GetPlugin(flow_name)
 if ((not flow_cls.ACL_ENFORCED) or (aff4.issubclass(flow_cls, flow.GRRGlobalFlow) and flow_cls.category)):
  return True
 else:
  raise access_control.UnauthorizedAccess(("Flow %s can't be started globally by non-suid users" % flow_name))

def CheckFlowCanBeStartedAsGlobal ( flow_name ) : flow_cls = flow . GRRFlow . GetPlugin ( flow_name ) if ( ( not flow_cls . ACL_ENFORCED ) or ( aff4 . issubclass ( flow_cls , flow . GRRGlobalFlow ) and flow_cls . category ) ) : return True else : raise access_control . UnauthorizedAccess ( ( "Flow %s can't be started globally by non-suid users" % flow_name ) )
checks if flow can be started without a client id .