-
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 #131 from bento-platform/chore/mark-authz-done-mixin
chore: move mark authz done fn into mixin for use in authz service
- Loading branch information
Showing
6 changed files
with
38 additions
and
19 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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from abc import abstractmethod | ||
from typing import Any | ||
|
||
|
||
__all__ = ["MarkAuthzDoneMixin"] | ||
|
||
|
||
class MarkAuthzDoneMixin: | ||
@staticmethod | ||
@abstractmethod | ||
def mark_authz_done(request: Any): # pragma: no cover | ||
pass |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from typing import Type | ||
|
||
from ..auth.middleware.mark_authz_done_mixin import MarkAuthzDoneMixin | ||
|
||
__all__ = [ | ||
"EvaluationResultMatrix", | ||
"MarkAuthzDoneType", | ||
] | ||
|
||
EvaluationResultMatrix = tuple[tuple[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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[package] | ||
name = bento_lib | ||
version = 9.0.0a2 | ||
version = 9.0.0a3 | ||
authors = David Lougheed, Paul Pillot | ||
author_emails = [email protected], [email protected] |
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