mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 00:59:17 +02:00
Additional setting to control wether music library federation needs approval
This commit is contained in:
parent
48df30dbd8
commit
a81c92dbf5
5 changed files with 50 additions and 1 deletions
|
@ -57,3 +57,11 @@ class Actor(models.Model):
|
|||
setattr(self, field, v.lower())
|
||||
|
||||
super().save(**kwargs)
|
||||
|
||||
@property
|
||||
def is_system(self):
|
||||
from . import actors
|
||||
return all([
|
||||
settings.FEDERATION_HOSTNAME == self.domain,
|
||||
self.preferred_username in actors.SYSTEM_ACTORS
|
||||
])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue