CouchDB and PHP Web Development Beginner’s Guide
上QQ阅读APP看书,第一时间看更新

Time for action — securing the _users database

Let's secure the _users database so that only server admins can read, write, and edit the other users within the system.

  1. Open Futon to the Overview.
  2. Click on the _users database.
  3. Click on Security at the top of the screen.
    Time for action — securing the _users database
  4. Change the values of Roles for both Admins and Readers to ["admins"], so it looks as follows:
    Time for action — securing the _users database

What just happened?

You just changed the roles of Admins and Readers for the _users database to ["admins"], so that only admins could read or alter the design documents and readers' list. We made the format of the roles ["admins"] because it accepts roles in the form of an array.