-
-
Notifications
You must be signed in to change notification settings - Fork 187
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(organizations): disable email updates for regular organization members TASK-997 #5233
Conversation
</> | ||
)} | ||
</div> | ||
<div className={styles.options}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move this container div inside the userCanChangeEmail check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit of a hack, if the container div is inside of the check then the rest of the row CSS gets unaligned. The only way I saw to fix this was to add conditional styling which I thought looked worse than this. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I wondered if that might be the reason. I'd say we should go with conditional CSS. You're right that it will add some more complexity, but I think it will make it easier for other coders working on this section in the future to know what's going on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@duvld There was an import error, so I pushed a fix for that. I also made a small change to simplify the logic in that cx() function. You can go ahead and merge unless you have any objections to my changes.
🗒️ Checklist
<type>(<scope>)<!>: <title> TASK-1234
frontend
orbackend
unless it's global📣 Summary
UI for changing emails is disabled for
Members
of a multi-member organization.👀 Preview steps
📖 Description
Remove the text box and button entirely if the user is a
member
. Replaced with just text of the email returned from/me
.💭 Notes
Make sure the user either has the proper email reflected in the user section of the django admin or was created through an email confirmation link. See https://www.notion.so/kobotoolbox/task-1236