diff --git a/CHANGELOG.md b/CHANGELOG.md index 70ac40d112e4..858ec855c722 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Throttling policy for unauthenticated users () ### Changed -- +- Removed information about e-mail from the basic user information () ### Deprecated - diff --git a/cvat/apps/engine/serializers.py b/cvat/apps/engine/serializers.py index 207915201492..8d047e0d8f7d 100644 --- a/cvat/apps/engine/serializers.py +++ b/cvat/apps/engine/serializers.py @@ -328,7 +328,7 @@ def validate(self, data): class Meta: model = User - fields = ('url', 'id', 'username', 'first_name', 'last_name', 'email') + fields = ('url', 'id', 'username', 'first_name', 'last_name') ordering = ['-id'] class UserSerializer(serializers.ModelSerializer): diff --git a/cvat/apps/engine/tests/_test_rest_api.py b/cvat/apps/engine/tests/_test_rest_api.py index 46c6f3e56662..c8bee86c4609 100644 --- a/cvat/apps/engine/tests/_test_rest_api.py +++ b/cvat/apps/engine/tests/_test_rest_api.py @@ -552,8 +552,8 @@ def _check_data(self, user, data, is_full): self.assertEqual(data["username"], user.username) self.assertEqual(data["first_name"], user.first_name) self.assertEqual(data["last_name"], user.last_name) - self.assertEqual(data["email"], user.email) extra_check = self.assertIn if is_full else self.assertNotIn + extra_check("email", data) extra_check("groups", data) extra_check("is_staff", data) extra_check("is_superuser", data)