Skip to content

Commit

Permalink
Default value for when default_permissions argument is not provided (#86
Browse files Browse the repository at this point in the history
)

* Default value for when default_permissions is not provided

* Fix typos

* Update isort version to pass CI

* Ran precommits

---------

Co-authored-by: Dylan LEROUX <[email protected]>
  • Loading branch information
Rictus and Dylan LEROUX authored Feb 2, 2023
1 parent 7cf8ce8 commit 4d4a2f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: pretty-format-json
args: ["--autofix"]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
Expand Down
8 changes: 5 additions & 3 deletions easyauth/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,11 +961,13 @@ async def mock_function(*args, **kwargs):

return auth_endpoint

def parse_permissions(self, users, groups, roles, actions, default_permissions):
def parse_permissions(
self, users, groups, roles, actions, default_permissions=None
):
"""
returns permssions defined on a given endpoint if set
returns permissions defined on a given endpoint if set
if unset
returns router dedfault permissions
returns router default permissions
if no router defaults
return EasyAuthServer default permissions
"""
Expand Down

0 comments on commit 4d4a2f4

Please sign in to comment.