docs: def channels_for_role(role):
      """
      Get the channels for a role
      """
      chans = []
      chans_names = []
      # default channels
      if role == "public":
          if ENABLE_PUBLIC_CHANNEL is True:
              chan = dict(slug=PUBLIC_CHANNEL, path=None)
              chans.append(chan)
              chans_names.append(PUBLIC_CHANNEL)
      elif role == "users":
          if ENABLE_USERS_CHANNEL is True:
              chan = _ensure_channel_is_private(DEFAULT_USERS_CHANNEL)
              chan = dict(slug=chan, path=None)
              chans.append(chan)
              chans_names.append(DEFAULT_USERS_CHANNEL)
      elif role == "staff":
          if ENABLE_STAFF_CHANNEL is True:
              chan = _ensure_channel_is_private(DEFAULT_STAFF_CHANNEL)
              chan = dict(slug=chan, path=None)
              chans.append(chan)
              chans_names.append(DEFAULT_STAFF_CHANNEL)
      elif role == "superuser":
          if ENABLE_SUPERUSER_CHANNEL is True:
              chan = _ensure_channel_is_private(DEFAULT_SUPERUSER_CHANNEL)
              chan = dict(slug=chan, path=None)
              chans.append(chan)
              chans_names.append(DEFAULT_SUPERUSER_CHANNEL)
      # declared channels
      if role == "public":
          if len(PUBLIC_CHANNELS) > 0:
              for chanconf in PUBLIC_CHANNELS:
                  chan = _check_chanconf(chanconf, False)
                  chans.append(chan)
                  chans_names.append(chan["slug"])
      elif role == "users":
          if len(USERS_CHANNELS) > 0:
              for chanconf in USERS_CHANNELS:
                  chan = _check_chanconf(chanconf)
                  chans.append(chan)
                  chans_names.append(chan["slug"])
      elif role == "staff":
          if len(STAFF_CHANNELS) > 0:
              for chanconf in STAFF_CHANNELS:
                  chan = _check_chanconf(chanconf)
                  chans.append(chan)
                  chans_names.append(chan["slug"])
      elif role == "superuser":
          if len(SUPERUSER_CHANNELS) > 0:
              for chanconf in SUPERUSER_CHANNELS:
                  chan = _check_chanconf(chanconf)
                  chans.append(chan)
                  chans_names.append(chan["slug"])
      return chans, chans_names