Hi, I have the following case where I'm not author...
# community-help
g
Hi, I have the following case where I'm not authorized. Cannot find why: Key that exist
Copy code
{
  "actions": [
    "documents:search"
  ],
  "collections": [
    "products",
    "wharehouses"
  ],
  "value_prefix": "fKzc"
}
Aliases that exists
Copy code
{
  "aliases": [
    {
      "collection_name": "prod-wharehouses-21-07-30-14",
      "name": "wharehouses"
    },
    {
      "collection_name": "prod-products-21-07-30-16",
      "name": "products"
    }
  ]
}
Collections that exists
Copy code
[
{ "name": "prod-wharehouses-21-07-30-14"},
{ "name": "prod-products-21-07-30-16"}
]
I'm trying using the first key to search (multisearch) but I'm not authorized. The same happen if I try to export documents
Copy code
GET /collections/products/documents/export
j
@gab gab you want to use the collection name, not the alias name when creating the key
IIRC, you can even add regex collection names when creating the key… We spoke about, I need to look deeper to see if it made it into a release.
g
Ok after looking deeper it looks like I'm assigning wrong permission. I Should have assigned
documents:export
/`documents:get` . It seems to work with the alias. I'm curious for the regexp because I do not know the collection names. I will check if for multi search I need something like
documents:multisearch
instead of
documents:search
It doesn't works for searching permissions. Strange it works fine with an alias with
documents:search
I have the version
Copy code
{
  "state": 1,
  "version": "0.21.0.rc24"
}
Is it possible to migrate my cloud cluster to 0.21 ? Is there a way so I can update it myself for later version updates?
1
j
Oh good to know it works with an alias! Wasn't anticipating that use case 🙂
@gab gab Confirming that we did release support for regex collection names: https://github.com/typesense/typesense/issues/139
👍 1