-
Notifications
You must be signed in to change notification settings - Fork 19
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
#2854 - Org Member Invitation - [NL] #3080
Conversation
🥳 Successfully deployed to developer sandbox nl. |
🥳 Successfully deployed to developer sandbox nl. |
🥳 Successfully deployed to developer sandbox nl. |
🥳 Successfully deployed to developer sandbox nl. |
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.
UI wise, looks great. I like how you are handling things in javascript. One thing I'll note is that Member Access
seems to be using the value rather than the display value.
I will note though that submit_new_member
can be simplified + cleaned a bit (I've denoted it). Its fine for now since we aren't sending any emails out, but the current structure will cause some side affects once we do
<p class="margin-top-0" id="modalEmail"></p> | ||
|
||
<h4 class="text-primary">Member Access</h4> | ||
<p class="margin-top-0" id="modalAccessLevel"></p> |
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.
(nitpick/optional) Maybe better described as modalMemberAccessLevel
reinstated js portion of add new member page
🥳 Successfully deployed to developer sandbox nl. |
The UI uses the value because that is what matches the design ACs according to the Figma (they do not want "Basic Access" or "Admin Access"...just "Basic" and "Admin". It's a bit of a shortcut, but I think better than stripping out substrings) |
🥳 Successfully deployed to developer sandbox nl. |
🥳 Successfully deployed to developer sandbox nl. |
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.
See blocking comments before merging but otherwise LGTM on getgov-NL
if not requestor.is_staff and requestor.email is not None and requestor.email.strip() != "": | ||
requestor_email = requestor.email | ||
elif not requestor.is_staff: |
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.
(Change before merging) this shouldn't be checking on is_staff since we don't use this anymore, it should instead check on the usergroup
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.
We should definitely create a follow-up ticket for this because we are still using .is_staff in alot more places than just this. @abroddrick --tagging you for awareness
except Exception: | ||
logger.error("An error occured") | ||
|
||
try: |
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.
try: | |
if not add_success: | |
return None | |
try: |
missing an early return on not add_success. The above suggestion may have some faulty spacing though just fyi
if add_success: | ||
messages.success(self.request, f"{email} has been invited.") |
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.
if add_success: | |
messages.success(self.request, f"{email} has been invited.") | |
messages.success(self.request, f"{email} has been invited.") |
Not needed if we're doing an early return
Co-authored-by: zandercymatics <[email protected]>
Co-authored-by: zandercymatics <[email protected]>
🥳 Successfully deployed to developer sandbox nl. |
Ticket 2854
Resolves #2854
Changes
Context for reviewers
Setup
Make sure org model and member waffle flags are on
Code Review Verification Steps
Go to the members table, click "Add a new member". Fill out the form and click "Invite Member". Verify that:
- [ ] Inviting a new user creates a new corresponding Portfolio Invite (that you can view in /admin)
- [ ] Inviting an already invited user does not write to the database and a message saying the user "has already been invited to this portfolio" displays above the members table after redirect
- [ ] Inviting a user who is already a portfolio member does not write to the database and a message saying the user "User is already a member of this portfolio." displays above the members table after redirect
Also double-check that:
As the original developer, I have
Satisfied acceptance criteria and met development standards
Ensured code standards are met (Original Developer)
Validated user-facing changes (if applicable)
As a code reviewer, I have
Reviewed, tested, and left feedback about the changes
Validated user-facing changes as a developer
Note: Multiple code reviewers can share the checklists above, a second reviewer should not make a duplicate checklist. All checks should be checked before approving, even those labeled N/A.
As a designer reviewer, I have
Verified that the changes match the design intention
Validated user-facing changes as a designer
References
Screenshots