Skip to content

feat: add user disabling#640

Merged
t-aleksander merged 38 commits into
devfrom
add-disable-user
Jun 13, 2024
Merged

feat: add user disabling#640
t-aleksander merged 38 commits into
devfrom
add-disable-user

Conversation

@t-aleksander
Copy link
Copy Markdown
Contributor

@t-aleksander t-aleksander commented Jun 6, 2024

📖 Description

Adds the ability to disable a user.

image
image
image
image
image

Related PRs:
DefGuard/proxy#63
DefGuard/client#237
DefGuard/proto#19

🛠️ Dev Branch Merge Checklist:

Documentation

  • If testing requires changes in the environment or deployment, please update the documentation (https://defguard.gitbook.io) first and attach the link to the documentation section in this pool request
  • I have commented on my code, particularly in hard-to-understand areas

Testing

  • I have prepared end-to-end tests for all new functionalities
  • I have performed end-to-end tests manually and they work
  • New and existing unit tests pass locally with my changes

Deployment

  • If deployment is affected I have made corresponding/required changes to deployment (Docker, Kubernetes, one-line install)

🏚️ Main Branch Merge Checklist:

Testing

  • I have merged my changes before to dev and the dev checklist is done
  • I have tested all functionalities on the dev instance and they work

Documentation

  • I have made corresponding changes to the user & admin documentation and added new features documentation with screenshots for users/admins

@t-aleksander t-aleksander added the feature New feature or request label Jun 6, 2024
@t-aleksander t-aleksander self-assigned this Jun 6, 2024
@t-aleksander t-aleksander linked an issue Jun 6, 2024 that may be closed by this pull request
3 tasks
Copy link
Copy Markdown
Contributor

@j-chmielewski j-chmielewski left a comment

Choose a reason for hiding this comment

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

Needs integration tests

Comment thread src/db/models/wireguard.rs Outdated
Comment thread src/grpc/enrollment.rs Outdated
Comment thread src/grpc/enrollment.rs Outdated
Comment thread src/db/models/enrollment.rs
Comment thread src/db/models/enrollment.rs
Comment thread web/src/i18n/en/index.ts Outdated
Comment thread web/src/i18n/en/index.ts Outdated
Comment thread web/src/pages/users/UserProfile/UserProfile.tsx Outdated
Comment thread web/src/pages/users/UsersOverview/components/UserEditButton/UserEditButton.tsx Outdated
Comment thread src/db/models/mod.rs
Comment thread e2e/tests/enrollment.spec.ts Outdated
await setPassword(page);
// VPN
await page.getByTestId('enrollment-next').click();
const deviceCreationMessage = page.waitForEvent('console');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we find a more reliable way of capturing this event? Perhaps check if api response status == 400?

Comment thread e2e/tests/enrollment.spec.ts Outdated
expect((await deviceCreationMessage).text()).toBe(
'Failed to load resource: the server responded with a status of 400 (Bad Request)'
);
const userActivationMessage = page.waitForEvent('console');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we find a more reliable way of capturing this event? Perhaps check if api response status == 400?

Comment thread e2e/tests/auth.spec.ts
Comment thread src/grpc/password_reset.rs
Comment thread src/grpc/password_reset.rs
Comment thread src/db/models/user.rs Outdated
Comment thread src/grpc/password_reset.rs Outdated
@t-aleksander t-aleksander marked this pull request as ready for review June 12, 2024 10:52
@t-aleksander t-aleksander merged commit 4dc9ff8 into dev Jun 13, 2024
@t-aleksander t-aleksander deleted the add-disable-user branch June 13, 2024 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disabling a user

3 participants