Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide database name to authorization constraint functions #6

Closed
OldSneerJaw opened this issue Mar 7, 2018 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request

Comments

@OldSneerJaw
Copy link
Owner

OldSneerJaw commented Mar 7, 2018

To make it easier to tailor authorization to each database, pass the database's name as the third argument to functions for the authorizedRoles, authorizedUsers and grantAllMembersWriteAccess document definition constraints. For example:

authorizedRoles: function(doc, oldDoc, dbName) {
  return {
    write: dbName + '-write';
  };
}
@OldSneerJaw OldSneerJaw added the enhancement New feature or request label Mar 7, 2018
@OldSneerJaw OldSneerJaw changed the title Provide database name to authorizeRoles and authorizedUsers constraint functions Provide database name to authorizedRoles and authorizedUsers constraint functions Mar 7, 2018
@OldSneerJaw OldSneerJaw self-assigned this Mar 7, 2018
@OldSneerJaw OldSneerJaw changed the title Provide database name to authorizedRoles and authorizedUsers constraint functions Provide database name to authorization constraint functions Mar 7, 2018
OldSneerJaw added a commit that referenced this issue Mar 7, 2018
Applies to the `authorizedRoles`, `authorizedUsers` and `grantAllMembersWriteAccess` document definition constraint functions.
@OldSneerJaw
Copy link
Owner Author

Addressed by commit e4e1dae.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant