fix(plex): do not fail to import Plex users when Plex Home has managed users (#1699)

* fix(plex): do not fail to import Plex users when Plex Home has managed users

* fix: default display name to email when user has no username

also, do not set username or plexUsername when it is the same as the user's email address

* fix(ui): user display name placeholder should reflect fallback logic if username is not set

* fix(ui): hide email addresses of other users if logged-in user does not have Manage Users permission

* fix: always set Plex username even if same as user's email

* fix: remove unnecessary permission check

* fix: transform email addresses to lowercase
This commit is contained in:
TheCatLady
2021-05-30 19:38:52 -04:00
committed by GitHub
parent 6603dffe95
commit 310cdb36df
7 changed files with 68 additions and 61 deletions

View File

@@ -65,7 +65,7 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({
{user.displayName}
</a>
</Link>
{user.email && (
{user.email && user.displayName.toLowerCase() !== user.email && (
<span className="text-sm text-gray-400 sm:text-lg sm:ml-2">
({user.email})
</span>