Skip to content

Commit

Permalink
docs: improve docstring description in assert_permission
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent-laporte-pro committed Feb 8, 2024
1 parent d11b7a5 commit 01c2e46
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion antarest/study/storage/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,12 @@ def assert_permission(
permission_type: level of permission
raising: raise error if permission not matched
Returns: true if permission match, false if not raising.
Returns:
`True` if the user has the required permissions, `False` otherwise.
Raises:
`UserHasNotPermissionError`: If the raising parameter is set to `True`
and the user does not have the required permissions.
"""
studies = [study] if study else []
return assert_permission_on_studies(user, studies, permission_type, raising=raising)
Expand Down

0 comments on commit 01c2e46

Please sign in to comment.