1
0
mirror of https://github.com/etesync/server synced 2024-11-22 08:48:07 +00:00

Rename encryptedSeckey to encryptedContent.

This commit is contained in:
Tom Hacohen 2020-06-02 18:56:23 +03:00
parent 7842bd4d9c
commit ad184f0ac3
3 changed files with 22 additions and 4 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.0.3 on 2020-06-02 15:58
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('django_etesync', '0013_collectionmemberremoved'),
]
operations = [
migrations.RenameField(
model_name='userinfo',
old_name='encryptedSeckey',
new_name='encryptedContent',
),
]

View File

@ -214,7 +214,7 @@ class UserInfo(models.Model):
version = models.PositiveSmallIntegerField(default=1)
loginPubkey = models.BinaryField(editable=True, blank=False, null=False)
pubkey = models.BinaryField(editable=True, blank=False, null=False)
encryptedSeckey = models.BinaryField(editable=True, blank=False, null=False)
encryptedContent = models.BinaryField(editable=True, blank=False, null=False)
salt = models.BinaryField(editable=True, blank=False, null=False)
def __str__(self):

View File

@ -333,11 +333,11 @@ class InvitationAcceptSerializer(serializers.Serializer):
class UserSerializer(serializers.ModelSerializer):
pubkey = BinaryBase64Field(source='userinfo.pubkey')
encryptedSeckey = BinaryBase64Field(source='userinfo.encryptedSeckey')
encryptedContent = BinaryBase64Field(source='userinfo.encryptedContent')
class Meta:
model = User
fields = (User.USERNAME_FIELD, User.EMAIL_FIELD, 'pubkey', 'encryptedSeckey')
fields = (User.USERNAME_FIELD, User.EMAIL_FIELD, 'pubkey', 'encryptedContent')
class UserInfoPubkeySerializer(serializers.ModelSerializer):
@ -362,7 +362,7 @@ class AuthenticationSignupSerializer(serializers.Serializer):
salt = BinaryBase64Field()
loginPubkey = BinaryBase64Field()
pubkey = BinaryBase64Field()
encryptedSeckey = BinaryBase64Field()
encryptedContent = BinaryBase64Field()
def create(self, validated_data):
"""Function that's called when this serializer creates an item"""