How an app can retrieve the list of channels that the user has access to?
A query to host:4984/DB/_session yields:
{
"authentication_handlers": [
"default",
"cookie"
],
"ok": true,
"userCtx": {
"channels": {
"!": 1,
"ADMIN_CHANNEL": 5,
"public": 2
},
"name": "USER"
}
}
In this case the channels property doesn’t contains all the channels that are assigned by the sync_function, channels computed from roles aren’t listed.
Should I write a wrapper for host:4985/DB/_user/USER and read the all_channels result?