Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: user display name #1179

Merged
merged 20 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
018c111
feat: user display name for the entire system
pablohashescobar Jun 2, 2023
9308986
feat: update issue activity to remove emails
pablohashescobar Jun 2, 2023
73a81d9
dev: update to display name wherever assignees__email and member__email
pablohashescobar Jun 12, 2023
94c2a08
Merge branch 'develop' of github.com:makeplane/plane into feat/displa…
pablohashescobar Jul 19, 2023
fc1a25b
Merge branch 'develop' of github.com:makeplane/plane into feat/displa…
pablohashescobar Jul 24, 2023
f43e849
dev: update display names on issue activity and the user script
pablohashescobar Jul 24, 2023
d4268fa
dev: update display_name function to generate display_name from email
pablohashescobar Jul 24, 2023
8278f38
Merge branch 'develop' of github.com:makeplane/plane into feat/displa…
pablohashescobar Aug 4, 2023
676d385
dev: add email for test purpose
pablohashescobar Aug 4, 2023
f17879a
dev: set default display name for the user
pablohashescobar Aug 4, 2023
94efc07
dev: add migration script and default value
pablohashescobar Aug 4, 2023
3c93a6d
dev: annotate with assignees_id
pablohashescobar Aug 4, 2023
df385a5
dev: return assignees id
pablohashescobar Aug 7, 2023
518f49b
dev: display name for the profile
pablohashescobar Aug 7, 2023
329de64
dev: project members endpoint
pablohashescobar Aug 7, 2023
e9162c7
dev: url update
pablohashescobar Aug 7, 2023
21ea89b
dev: trailing /
pablohashescobar Aug 7, 2023
fa3c49c
dev: update workspace member serializer
pablohashescobar Aug 7, 2023
85ac450
Merge branch 'develop' of github.com:makeplane/plane into feat/displa…
pablohashescobar Aug 7, 2023
3682cb5
fix: activity for assignees
pablohashescobar Aug 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions apiserver/plane/api/serializers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
from .base import BaseSerializer
from .people import (
ChangePasswordSerializer,
ResetPasswordSerializer,
TokenSerializer,
)
from .user import UserSerializer, UserLiteSerializer
from .user import UserSerializer, UserLiteSerializer, ChangePasswordSerializer, ResetPasswordSerializer
from .workspace import (
WorkSpaceSerializer,
WorkSpaceMemberSerializer,
Expand Down
57 changes: 0 additions & 57 deletions apiserver/plane/api/serializers/people.py

This file was deleted.

25 changes: 24 additions & 1 deletion apiserver/plane/api/serializers/user.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Third party imports
from rest_framework import serializers

# Module import
from .base import BaseSerializer
from plane.db.models import User
Expand Down Expand Up @@ -37,11 +40,31 @@ class Meta:
"id",
"first_name",
"last_name",
"email",
"avatar",
"is_bot",
"display_name",
]
read_only_fields = [
"id",
"is_bot",
]


class ChangePasswordSerializer(serializers.Serializer):
model = User

"""
Serializer for password change endpoint.
"""
old_password = serializers.CharField(required=True)
new_password = serializers.CharField(required=True)


class ResetPasswordSerializer(serializers.Serializer):
model = User

"""
Serializer for password change endpoint.
"""
new_password = serializers.CharField(required=True)
confirm_password = serializers.CharField(required=True)
2 changes: 1 addition & 1 deletion apiserver/plane/api/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
ProjectMemberUserEndpoint,
ProjectFavoritesViewSet,
)
from .people import (
from .user import (
UserEndpoint,
UpdateUserOnBoardedEndpoint,
UserActivityEndpoint,
Expand Down
2 changes: 1 addition & 1 deletion apiserver/plane/api/views/auth_extended.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

## Module imports
from . import BaseAPIView
from plane.api.serializers.people import (
from plane.api.serializers import (
ChangePasswordSerializer,
ResetPasswordSerializer,
)
Expand Down
2 changes: 1 addition & 1 deletion apiserver/plane/api/views/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def post(self, request, slug, project_id, service):
actor=request.user,
project_id=project_id,
workspace_id=project.workspace_id,
comment=f"{request.user.email} importer the issue from {service}",
comment=f"imported the issue from {service}",
verb="created",
created_by=request.user,
)
Expand Down
2 changes: 1 addition & 1 deletion apiserver/plane/api/views/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def post(self, request, slug, project_id, page_id, page_block_id):
issue=issue,
actor=request.user,
project_id=project_id,
comment=f"{request.user.email} created the issue from {page_block.name} block",
comment=f"created the issue from {page_block.name} block",
verb="created",
)

Expand Down
File renamed without changes.
Loading