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

implement option for custom security check for views #60

Closed
sgratzl opened this issue Nov 30, 2017 · 1 comment
Closed

implement option for custom security check for views #60

sgratzl opened this issue Nov 30, 2017 · 1 comment
Assignees
Labels
priority: medium type: feature New feature or request
Milestone

Comments

@sgratzl
Copy link
Contributor

sgratzl commented Nov 30, 2017

e.g. whether the user has a certain role

.security(lambda user: user.has_role('role_name'))
@sgratzl sgratzl added priority: medium type: feature New feature or request labels Nov 30, 2017
@sgratzl sgratzl added this to the Sprint 2 milestone Nov 30, 2017
@sgratzl sgratzl self-assigned this Nov 30, 2017
@sgratzl
Copy link
Contributor Author

sgratzl commented Nov 30, 2017

added options:

server side: DBViewBuilder.security(rolename|(user)=>boolean)
client side: part of tdpView extension definition: security: (rolename|(user) => boolean)

zB

 .security('admin')
 .security(lambda user: user.has_role('admin'))
  security: 'admin'
  security: function(user) { return user.roles.indexOf('admin') >= 0}

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

No branches or pull requests

2 participants