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

fix: show enrollment modal for existing clients after e2ei activation [WPB-9816] #17422

Merged
merged 3 commits into from
May 22, 2024

Conversation

aweiss-dev
Copy link
Member

@aweiss-dev aweiss-dev commented May 17, 2024

We did automatically "snooze" the certificate enrollment for existing clients, after e2ei feature activation.
This was not supposed to happen, instead we need to show the activation modal to the user, and he/she needs to take action to either enroll or snooze him-/herself

@aweiss-dev aweiss-dev changed the base branch from dev to release/q1-2024 May 17, 2024 13:05
@aweiss-dev aweiss-dev marked this pull request as ready for review May 17, 2024 17:29
@aweiss-dev aweiss-dev requested review from otto-the-bot and a team as code owners May 17, 2024 17:29
Copy link
Contributor

@tlebon tlebon left a comment

Choose a reason for hiding this comment

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

seems fine / please add.. something to the PR body.

@@ -99,6 +100,11 @@ export function getEnrollmentTimer(
const deadline = getGracePeriod(identity, e2eiActivatedAt, teamGracePeriodDuration);
const nextTick = getNextTick(deadline);

// For the first activation, we want to trigger the timer immediately
if (isFirstActivation) {
return {isSnoozable: nextTick > 0, firingDate: Date.now()};
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Will it be snoozable for the existing mls client (basic credential type) during the grace period? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

Depends on the nextTick value I guess.

Nothing changed code related to this case. We just show the modal now with the option to snooze after first activation instead of snoozing automatically.

Copy link

sonarcloud bot commented May 22, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@PatrykBuniX PatrykBuniX left a comment

Choose a reason for hiding this comment

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

Looks fine

@aweiss-dev aweiss-dev merged commit 72c8c63 into release/q1-2024 May 22, 2024
11 checks passed
@aweiss-dev aweiss-dev deleted the fix/WPB-9816 branch May 22, 2024 11:53
github-actions bot pushed a commit that referenced this pull request May 22, 2024
… [WPB-9816] (#17422)

* fix: show modal after first activation

* chore: please pipeline, run tests

* fix: make it possible to snooze for existing clients after failed enrolment
otto-the-bot added a commit that referenced this pull request May 22, 2024
… [WPB-9816] (#17422) (#17438)

* fix: show modal after first activation

* chore: please pipeline, run tests

* fix: make it possible to snooze for existing clients after failed enrolment

Co-authored-by: Adrian Weiß <77456193+aweiss-dev@users.noreply.github.com>
PatrykBuniX added a commit that referenced this pull request May 22, 2024
PatrykBuniX added a commit that referenced this pull request May 23, 2024
* Revert "fix: show enrollment modal for existing clients after e2ei activation [WPB-9816] (#17422)"

This reverts commit 72c8c63.

* runfix: show modal for a basic device

* runfix: old client can snooze the enrollment

* test: enrollment for basic credential type
github-actions bot pushed a commit that referenced this pull request May 23, 2024
* Revert "fix: show enrollment modal for existing clients after e2ei activation [WPB-9816] (#17422)"

This reverts commit 72c8c63.

* runfix: show modal for a basic device

* runfix: old client can snooze the enrollment

* test: enrollment for basic credential type
otto-the-bot added a commit that referenced this pull request May 23, 2024
* Revert "fix: show enrollment modal for existing clients after e2ei activation [WPB-9816] (#17422)"

This reverts commit 72c8c63.

* runfix: show modal for a basic device

* runfix: old client can snooze the enrollment

* test: enrollment for basic credential type

Co-authored-by: Patryk Górka <patrykbunix@gmail.com>
PatrykBuniX added a commit that referenced this pull request May 24, 2024
PatrykBuniX added a commit that referenced this pull request May 24, 2024
* Revert "fix: show enrollment modal for existing clients after e2ei activation [WPB-9816] (#17422)"

This reverts commit 72c8c63.

* runfix: old client can snooze the enrollment

* runfix: show the update button during the grace period

* runfix: always calculate the next fire date

* runfix: don't open the confirmation modal if delay <= 0

* test: fix tests

* test: show get cert button

* Revert "runfix: always calculate the next fire date"

This reverts commit b15d2c7.

* runfix: reset timers when updating the cert manually

* refactor: use certificate status

* runfix: pass 'is current device' flag

* runfix: update state after enrollment

* runfix: recalculate isSnoozable value when task runs

* refactor: improve naming

* runfix: get and update buttons visible at once

* test: update expired cert test

* test: expires soon cert
github-actions bot pushed a commit that referenced this pull request May 24, 2024
* Revert "fix: show enrollment modal for existing clients after e2ei activation [WPB-9816] (#17422)"

This reverts commit 72c8c63.

* runfix: old client can snooze the enrollment

* runfix: show the update button during the grace period

* runfix: always calculate the next fire date

* runfix: don't open the confirmation modal if delay <= 0

* test: fix tests

* test: show get cert button

* Revert "runfix: always calculate the next fire date"

This reverts commit b15d2c7.

* runfix: reset timers when updating the cert manually

* refactor: use certificate status

* runfix: pass 'is current device' flag

* runfix: update state after enrollment

* runfix: recalculate isSnoozable value when task runs

* refactor: improve naming

* runfix: get and update buttons visible at once

* test: update expired cert test

* test: expires soon cert
PatrykBuniX added a commit that referenced this pull request May 27, 2024
* Revert "fix: show enrollment modal for existing clients after e2ei activation [WPB-9816] (#17422)"

This reverts commit 72c8c63.

* runfix: old client can snooze the enrollment

* runfix: show the update button during the grace period

* runfix: always calculate the next fire date

* runfix: don't open the confirmation modal if delay <= 0

* test: fix tests

* test: show get cert button

* Revert "runfix: always calculate the next fire date"

This reverts commit b15d2c7.

* runfix: reset timers when updating the cert manually

* refactor: use certificate status

* runfix: pass 'is current device' flag

* runfix: update state after enrollment

* runfix: recalculate isSnoozable value when task runs

* refactor: improve naming

* runfix: get and update buttons visible at once

* test: update expired cert test

* test: expires soon cert
PatrykBuniX added a commit that referenced this pull request May 27, 2024
* runfix: renew certificate device details [WPB-9193] (#17451)

* Revert "fix: show enrollment modal for existing clients after e2ei activation [WPB-9816] (#17422)"

This reverts commit 72c8c63.

* runfix: old client can snooze the enrollment

* runfix: show the update button during the grace period

* runfix: always calculate the next fire date

* runfix: don't open the confirmation modal if delay <= 0

* test: fix tests

* test: show get cert button

* Revert "runfix: always calculate the next fire date"

This reverts commit b15d2c7.

* runfix: reset timers when updating the cert manually

* refactor: use certificate status

* runfix: pass 'is current device' flag

* runfix: update state after enrollment

* runfix: recalculate isSnoozable value when task runs

* refactor: improve naming

* runfix: get and update buttons visible at once

* test: update expired cert test

* test: expires soon cert

* runfix: reset timer only after user interaction with modal [WPB-9431] (#17469)

* runfix: reset timer only after user interaction with modal

* test: reset timer on user interaction

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

Successfully merging this pull request may close these issues.

None yet

4 participants