-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tb1337
committed
Feb 5, 2024
1 parent
37bfc44
commit 6c8110f
Showing
24 changed files
with
198 additions
and
65 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
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
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
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
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,23 @@ | ||
"""SecurableMixin for PyPaperless helpers.""" | ||
|
||
|
||
class SecurableMixin: # pylint: disable=too-few-public-methods | ||
"""Provide the `request_full_permissions` property for PyPaperless helpers.""" | ||
|
||
_request_full_perms: bool = False | ||
|
||
@property | ||
def request_permissions(self) -> bool: | ||
"""Return whether the helper requests items with the `permissions` table, or not. | ||
Documentation: https://docs.paperless-ngx.com/api/#permissions | ||
""" | ||
return self._request_full_perms | ||
|
||
@request_permissions.setter | ||
def request_permissions(self, value: bool) -> None: | ||
"""Set whether the helper requests items with the `permissions` table, or not. | ||
Documentation: https://docs.paperless-ngx.com/api/#permissions | ||
""" | ||
self._request_full_perms = value |
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,14 +1,17 @@ | ||
"""Mixins for PyPaperless models.""" | ||
|
||
from .creatable import CreatableMixin | ||
from .data_fields import MatchingFieldsMixin, PermissionFieldsMixin | ||
from .data_fields import MatchingFieldsMixin # , PermissionFieldsMixin | ||
from .deletable import DeletableMixin | ||
from .securable import SecurableDraftMixin, SecurableMixin | ||
from .updatable import UpdatableMixin | ||
|
||
__all__ = ( | ||
"CreatableMixin", | ||
"DeletableMixin", | ||
"MatchingFieldsMixin", | ||
"PermissionFieldsMixin", | ||
# "PermissionFieldsMixin", | ||
"UpdatableMixin", | ||
"SecurableMixin", | ||
"SecurableDraftMixin", | ||
) |
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
Oops, something went wrong.