Skip to content

Commit

Permalink
Allowing project owners and delegates to import cases via API (#207).
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Nov 22, 2021
1 parent 6a97c82 commit 559f104
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 2 additions & 0 deletions HISTORY.rst
Expand Up @@ -11,6 +11,7 @@ End-User Summary

- Fixing Kiosk mode of VarFish.
- Fixing displaying of beacon information in results table.
- Allowing project owners and delegates to import cases via API (#207).

Full Change List
================
Expand All @@ -21,6 +22,7 @@ Full Change List
- Kiosk annotation now uses ``set -x`` flag if ``settings.DEBUG`` is true.
- Mapping kiosk jobs to import queue.
- Fixing displaying of beacon information in results table.
- Allowing project owners and delegates to import cases via API (#207).

-------
v0.23.9
Expand Down
16 changes: 9 additions & 7 deletions importer/rules.py
Expand Up @@ -12,18 +12,20 @@

# Rules ------------------------------------------------------------------------


rules.add_perm(
"importer.view_import",
is_allowed_to_modify = (
rules.is_superuser
| pr_rules.is_project_owner
| pr_rules.is_project_delegate
| pr_rules.is_project_contributor,
| pr_rules.is_project_contributor
)

rules.add_perm(
"importer.view_import", is_allowed_to_modify,
)

rules.add_perm("importer.add_import", rules.is_superuser | pr_rules.is_project_contributor)
rules.add_perm("importer.delete_import", rules.is_superuser | pr_rules.is_project_contributor)
rules.add_perm("importer.update_import", rules.is_superuser | pr_rules.is_project_contributor)
rules.add_perm("importer.add_import", is_allowed_to_modify)
rules.add_perm("importer.delete_import", is_allowed_to_modify)
rules.add_perm("importer.update_import", is_allowed_to_modify)

# Permissions ------------------------------------------------------------------

Expand Down

0 comments on commit 559f104

Please sign in to comment.