#229 Shared users mandatory on admin

* changes mandatory state of users and teams on admin backend to optional (as expected by the model)
* adds team selection to admin backend
This commit is contained in:
2022-11-16 13:27:57 +01:00
parent deb97fbbf3
commit 14fee4474f
7 changed files with 99 additions and 7 deletions

View File

@@ -434,8 +434,16 @@ class CheckableObjectMixin(models.Model):
class ShareableObjectMixin(models.Model):
# Users having access on this object
users = models.ManyToManyField("user.User", help_text="Users having access (data shared with)")
teams = models.ManyToManyField("user.Team", help_text="Teams having access (data shared with)")
users = models.ManyToManyField(
"user.User",
help_text="Users having access (data shared with)",
blank=True
)
teams = models.ManyToManyField(
"user.Team",
help_text="Teams having access (data shared with)",
blank=True
)
access_token = models.CharField(
max_length=255,
null=True,