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

feat: add user disabling #640

Merged
merged 38 commits into from
Jun 13, 2024
Merged

feat: add user disabling #640

merged 38 commits into from
Jun 13, 2024

Conversation

t-aleksander
Copy link
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
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

src/db/models/wireguard.rs Outdated Show resolved Hide resolved
src/grpc/enrollment.rs Outdated Show resolved Hide resolved
src/grpc/enrollment.rs Outdated Show resolved Hide resolved
src/db/models/enrollment.rs Show resolved Hide resolved
src/db/models/enrollment.rs Show resolved Hide resolved
web/src/i18n/en/index.ts Outdated Show resolved Hide resolved
web/src/i18n/en/index.ts Outdated Show resolved Hide resolved
web/src/pages/users/UserProfile/UserProfile.tsx Outdated Show resolved Hide resolved
src/db/models/mod.rs Show resolved Hide resolved
await setPassword(page);
// VPN
await page.getByTestId('enrollment-next').click();
const deviceCreationMessage = page.waitForEvent('console');
Copy link
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?

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
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?

e2e/tests/auth.spec.ts Show resolved Hide resolved
src/grpc/password_reset.rs Show resolved Hide resolved
src/grpc/password_reset.rs Show resolved Hide resolved
src/db/models/user.rs Outdated Show resolved Hide resolved
@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
3 checks passed
@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