#19 Tests
* adds tests for compensations (WIP) * refactors some dummy data generating into base test class * fixes bugs detected by testing * adds important requirements.txt change for itsdangerous package (<1.0.0 for compatibility to django-simple-sso)
This commit is contained in:
@@ -229,6 +229,19 @@ class Compensation(AbstractCompensation):
|
||||
self.identifier = self.generate_new_identifier()
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
def is_shared_with(self, user: User):
|
||||
""" Access check
|
||||
|
||||
Checks whether a given user has access to this object
|
||||
|
||||
Args:
|
||||
user ():
|
||||
|
||||
Returns:
|
||||
|
||||
"""
|
||||
return self.intervention.users.filter(id=user.id)
|
||||
|
||||
def get_LANIS_link(self) -> str:
|
||||
""" Generates a link for LANIS depending on the geometry
|
||||
|
||||
|
||||
Reference in New Issue
Block a user