1. Ali Afshar
  2. flask-principal-main
Issue #5 on hold

"Negative" permissions

Dan Jacob
created an issue

It might be useful to be able to assign a "negative" permission.

For example, you might have a system where users can vote on comments, but not on comments they have written themselves. You therefore want to return a "negative" permission:

{{{

!python

NegativePermission(UserNeed(user.username)) }}}

Calling require() in this case raises PermissionDenied if the identity has the required role.