mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 06:39:16 +02:00
See #170: dispatch / handle delete and update on Audio
This commit is contained in:
parent
b04ba47a38
commit
8c93169d94
7 changed files with 255 additions and 9 deletions
|
@ -277,3 +277,18 @@ def get_object_by_fid(fid, local=None):
|
|||
return channel
|
||||
|
||||
return instance
|
||||
|
||||
|
||||
def can_manage(obj_owner, actor):
|
||||
if not obj_owner:
|
||||
return False
|
||||
|
||||
if not actor:
|
||||
return False
|
||||
|
||||
if obj_owner == actor:
|
||||
return True
|
||||
if obj_owner.domain.service_actor == actor:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue