# 308 To share info message
* adds needs-to-be-shared info message on entries which are only shared with the current user
This commit is contained in:
@@ -328,6 +328,20 @@ class Compensation(AbstractCompensation, CEFMixin, CoherenceMixin, PikMixin):
|
||||
# Compensations inherit their shared state from the interventions
|
||||
return self.intervention.is_shared_with(user)
|
||||
|
||||
def is_only_shared_with(self, user: User):
|
||||
""" Share check
|
||||
|
||||
Checks whether a given user is the only one having shared access to this entry
|
||||
|
||||
Args:
|
||||
user (User): The user to be checked
|
||||
|
||||
Returns:
|
||||
|
||||
"""
|
||||
# Compensations inherit their shared state from the interventions
|
||||
return self.intervention.is_only_shared_with(user)
|
||||
|
||||
def share_with_user(self, user: User):
|
||||
""" Adds user to list of shared access users
|
||||
|
||||
|
||||
Reference in New Issue
Block a user