-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Only org policy #962
Only org policy #962
Conversation
…licy since accepting
case PolicyType.OnlyOrg: | ||
break; |
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.
Why doesn't the 2FA policy enter this same code block? I would think the onlyorg and 2fa policies would be set up the same
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.
The 2FA policy wasn't represented in this switch at all, which was causing a bug: enabling the 2FA policy from the portal simply didn't work.
I noticed this, but it didn't seem in scope of this PR so I was planning to fast-follow and fix it later, like with deleting orgUser records with an org, but since you brought it up I went ahead and fixed it here 😁
src/Core/MailTemplates/Handlebars/OrganizationUserRemovedForPolicyOnlyOrg.html.hbs
Outdated
Show resolved
Hide resolved
if (orgUser.UserId.HasValue) | ||
{ | ||
var userOrgs = await _organizationUserRepository.GetManyByUserAsync(orgUser.UserId.Value); | ||
if (userOrgs.Count > 1) |
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.
same. i think you need to check status
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.
checked
@cscharf @kspearrin this one got a little muddy with the string changes (I'll try and run those by you guys before PR next time), but I think the only issue left open is this one regarding optimizing removal of users on policy enable. Let me know if you'd like me to make the change I suggested on that thread, or any others. |
b1f932f
to
ac97c52
Compare
src/Sql/dbo/Stored Procedures/OrganizationUser_ReadByUserIds.sql
Outdated
Show resolved
Hide resolved
src/Sql/dbo/Stored Procedures/OrganizationUser_ReadByUserIds.sql
Outdated
Show resolved
Hide resolved
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.
Will still need @kspearrin to review from his requested changes and approval before this can be merged.
throw new BadRequestException("You are already part of this organization."); | ||
} | ||
|
||
if (!CoreHelpers.UserInviteTokenIsValid(_dataProtector, token, user.Email, orgUser.Id, _globalSettings)) |
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.
Where did this token validation go?
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.
Was this comment looking at a specific commit? This logic was moved around in this PR, it's reflected in some commits here because of merge issues.
Narrative ✍🏻
As an enterprise organization admin I want to be able to block members of my organization from being able to be a part of other organizations.
Acceptance Criteria Relevant To This PR 💯
Code Changes 👨🏻💻
API
Portal
Screenshots
Notes 📝
Asana ticket
Web PR
jslib PR