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

Block system user from Inviting into Workspace #4781

Merged
merged 8 commits into from
Aug 26, 2021

Conversation

parasharrajat
Copy link
Member

@parasharrajat parasharrajat commented Aug 23, 2021

Details

  1. Block system users from inviting into Workspace.
  2. Fix a silly mistake where users can invite existing multiple users (stop adding duplicate members #4510).
  3. Fix users can invite existing users with phone number login.
  4. Fix copy to show that multiple users can be invited.

Fixed Issues

$ #4646

Tests | QA Steps

  1. Open any workspaces Settings on NewDot.
  2. Open Invite People page.

Test 1

  1. Try to invite System users (chronos@, receipts@, and concierge@).

Test 2

  1. try to invite multiple users(more than one) who already exist in workspaces.

Test 3

  1. Check the copy on the page, it should show that you can invite multiple users.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web | Desktop | Mobile Web

Copy corrected
Screenshot 2021-08-23 06:45:52

iOS

Android

Screenshot 2021-08-23 06:46:57

@parasharrajat parasharrajat requested a review from a team as a code owner August 23, 2021 01:08
@MelvinBot MelvinBot requested review from roryabraham and removed request for a team August 23, 2021 01:08
@parasharrajat
Copy link
Member Author

Please check the copy text. Let me know what would be the correct one and their translations.

Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good, but I had a few comments and want to get this copy + these translations vetted before we move forward.

* @param {String} login - user email
* @return {Boolean}
*/
function isSystemUser(login) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB but reportUtils feels like a weird place for this. Not sure I have a better suggestion for now unless we create userUtils or something?

@@ -88,9 +90,16 @@ class WorkspaceInvitePage extends React.Component {
Growl.error(this.props.translate('workspace.invite.pleaseEnterValidLogin'), 5000);
return;
}

const isEnteredLoginSystemLogin = _.some(logins, login => isSystemUser(login));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const isEnteredLoginSystemLogin = _.some(logins, login => isSystemUser(login));
const didEnterSystemLogin = _.some(logins, login => isSystemUser(login));

@roryabraham roryabraham added Waiting for copy User facing verbiage needs polishing and removed Waiting for copy User facing verbiage needs polishing labels Aug 23, 2021
@roryabraham
Copy link
Contributor

Getting some copy reviewed in the linked issue. However, in it's current state I don't think we'll want User to be capitalized.

pleaseEnterValidLogin: 'Please ensure the email or phone number is valid (e.g. +15005550006).',
pleaseEnterUniqueLogin: 'That user is already a member of this workspace.',
genericFailureMessage: 'An error occurred inviting the user to the workspace, please try again.',
systemUserError: 'Please ensure email or phone number is not a system User.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coming back from the linked issue, the copy we landed on here is:

Sorry, you cannot invite chronos@expensify.com to a workspace.

Using whichever invalid email was found first.

@parasharrajat
Copy link
Member Author

Do you think the label and placeholder are correct for the email input?
image

@roryabraham
Copy link
Contributor

Do you think the label and placeholder are correct for the email input?

I think Emails or Phones should be Emails or phone numbers

Copy link
Contributor

@roryabraham roryabraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM, but we should have someone buddy-check these translations after you make the next few changes.

personalMessagePrompt: 'Add a Personal Message (Optional)',
enterEmailOrPhone: 'Email or Phone',
enterEmailOrPhone: 'Emails or Phones',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
enterEmailOrPhone: 'Emails or Phones',
enterEmailOrPhone: 'Emails or phone numbers',

src/languages/en.js Outdated Show resolved Hide resolved
@parasharrajat
Copy link
Member Author

OK. It will look like this with numberoflines 2 after #4649 is merged.
Screenshot 2021-08-24 09:09:32

@roryabraham
Copy link
Contributor

Okay. This PR is not urgent so let's HOLD on #4649

@parasharrajat
Copy link
Member Author

@shawnborton Before we commit, I would like your feedback on the Changes to the Phone & email input here. #4781 (comment)

@shawnborton
Copy link
Contributor

Looks good to me. It seems like with this issue here, we might end up changing this page a bit but I think we still need to go through the design phase first.

The only other feedback is that we should be consistent with how we capitalize the labels used in each textarea on this page. Let's just stick with sentence case?

@parasharrajat
Copy link
Member Author

@roryabraham #4649 is merged. Let's move with this now. Thanks.

@roryabraham
Copy link
Contributor

Okay, let me get the translations checked

@parasharrajat
Copy link
Member Author

Translations are updated https://expensify.slack.com/archives/C01GTK53T8Q/p1629953043008900

@roryabraham roryabraham merged commit ae38f1b into Expensify:main Aug 26, 2021
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @roryabraham in version: 1.0.88-3 🚀

platform result
🤖 android 🤖 cancelled 🔪
🖥 desktop 🖥 cancelled 🔪
🍎 iOS 🍎 cancelled 🔪
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

OSBotify commented Sep 1, 2021

🚀 Deployed to production by @roryabraham in version: 1.0.90-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants