def CheckIfCanStartClientFlow(self, username, flow_name):
    """Checks whether a given user can start a given flow."""
    del username  # Unused.

    flow_cls = flow.GRRFlow.GetPlugin(flow_name)

    if not flow_cls.category:
      raise access_control.UnauthorizedAccess(
          "Flow %s can't be started via the API." % flow_name)
def CheckIfCanStartClientFlow ( self , username , flow_name ) : del username flow_cls = flow . GRRFlow . GetPlugin ( flow_name ) if not flow_cls . category : raise access_control . UnauthorizedAccess ( "Flow %s can't be started via the API." % flow_name )
Checks whether a given user can start a given flow.