-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from bento-platform/feat/auth/more-helpers
feat(auth): add evaluate-to-dict auth middleware functions
- Loading branch information
Showing
4 changed files
with
80 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
from typing import Type | ||
|
||
from ..auth.middleware.mark_authz_done_mixin import MarkAuthzDoneMixin | ||
from ..auth.permissions import Permission | ||
|
||
__all__ = [ | ||
"EvaluationResultMatrix", | ||
"EvaluationResultDict", | ||
"MarkAuthzDoneType", | ||
] | ||
|
||
EvaluationResultMatrix = tuple[tuple[bool, ...], ...] | ||
EvaluationResultDict = tuple[dict[Permission, bool], ...] | ||
|
||
# Allow subclass OR instance, since mark_authz_done is a static method: | ||
MarkAuthzDoneType = MarkAuthzDoneMixin | Type[MarkAuthzDoneMixin] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters