Skip to content

Commit

Permalink
permissions: add excludes to review police generator
Browse files Browse the repository at this point in the history
  • Loading branch information
anikachurilova authored and kpsherva committed Aug 9, 2024
1 parent fe0239e commit 7cc8f56
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions invenio_communities/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ def needs(self, record=None, **kwargs):
]
return set(chain.from_iterable(needs))

def excludes(self, record=None, **kwargs):
"""Set of Needs denying permission."""
needs = [
g.excludes(record=record, **kwargs)
for g in self._generators(record, **kwargs)
]
return set(chain.from_iterable(needs))


class IfRecordPolicyClosed(IfRestrictedBase):
"""If record policy is closed."""
Expand Down

0 comments on commit 7cc8f56

Please sign in to comment.