GitHub user fangq added a comment to the discussion: Understanding Admins 
name/role and Members name/role settings

@janl, after printing the `userCtx.roles` variable for a server-admin, I can 
see it has `_admin`. I found that the reason server-admin were rejected was 
because of an improper condition

I changed from
```
if('_admin' in userCtx.roles)
  return
```
to 
```
if(userCtx.roles.indexOf('_admin') !== -1)
  return
```
it now works.


would you be able to comment on my 1st question above?

> 1. does the above setting have any perceivable security risks?



GitHub link: 
https://github.com/apache/couchdb/discussions/5487#discussioncomment-12719096

----
This is an automatically sent email for notifications@couchdb.apache.org.
To unsubscribe, please send an email to: 
notifications-unsubscr...@couchdb.apache.org

Reply via email to