mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 10:49:15 +02:00
Resolve "Per-user libraries" (use !368 instead)
This commit is contained in:
parent
b0ca181016
commit
2ea21994ee
144 changed files with 6749 additions and 5347 deletions
|
@ -109,6 +109,16 @@ class UserReadSerializer(serializers.ModelSerializer):
|
|||
return o.get_permissions()
|
||||
|
||||
|
||||
class MeSerializer(UserReadSerializer):
|
||||
quota_status = serializers.SerializerMethodField()
|
||||
|
||||
class Meta(UserReadSerializer.Meta):
|
||||
fields = UserReadSerializer.Meta.fields + ["quota_status"]
|
||||
|
||||
def get_quota_status(self, o):
|
||||
return o.get_quota_status() if o.actor else 0
|
||||
|
||||
|
||||
class PasswordResetSerializer(PRS):
|
||||
def get_email_options(self):
|
||||
return {"extra_email_context": {"funkwhale_url": settings.FUNKWHALE_URL}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue