Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add PUT /api/v2/users/:user-id/suspend endpoint#1154

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BrunoQuaresma merged 11 commits intomainfrombq/suspend-user
Apr 26, 2022

Conversation

BrunoQuaresma
Copy link
Collaborator

Related to#662

@BrunoQuaresmaBrunoQuaresma requested a review froma teamApril 25, 2022 19:11
@BrunoQuaresmaBrunoQuaresma requested a review froma team as acode ownerApril 25, 2022 19:11
@BrunoQuaresmaBrunoQuaresma self-assigned thisApr 25, 2022
@codecov
Copy link

codecovbot commentedApr 25, 2022
edited
Loading

Codecov Report

Merging#1154 (cdebd55) intomain (f9ce54a) willdecrease coverage by0.10%.
The diff coverage is74.46%.

@@            Coverage Diff             @@##             main    #1154      +/-   ##==========================================- Coverage   66.34%   66.23%   -0.11%==========================================  Files         263      263                Lines       16615    16662      +47       Branches      156      156              ==========================================+ Hits        11023    11036      +13- Misses       4452     4477      +25- Partials     1140     1149       +9
FlagCoverage Δ
unittest-go-macos-latest53.59% <36.17%> (-0.13%)⬇️
unittest-go-postgres-65.46% <74.46%> (-0.14%)⬇️
unittest-go-ubuntu-latest56.10% <36.17%> (+0.01%)⬆️
unittest-go-windows-202253.16% <36.17%> (-0.01%)⬇️
unittest-js67.45% <ø> (ø)
Impacted FilesCoverage Δ
coderd/audit/table.go77.77% <ø> (ø)
codersdk/users.go64.20% <45.45%> (-1.25%)⬇️
coderd/users.go63.27% <64.70%> (+0.04%)⬆️
coderd/coderd.go97.53% <100.00%> (+0.01%)⬆️
coderd/database/queries.sql.go81.66% <100.00%> (+0.21%)⬆️
pty/start_other.go64.70% <0.00%> (-23.53%)⬇️
coderd/workspaceagents.go55.59% <0.00%> (-3.84%)⬇️
peer/channel.go83.81% <0.00%> (-1.16%)⬇️
agent/agent.go68.43% <0.00%> (-0.71%)⬇️
provisioner/terraform/provision.go70.96% <0.00%> (-0.44%)⬇️
... and5 more

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last updatef9ce54a...cdebd55. Read thecomment docs.

@BrunoQuaresma
Copy link
CollaboratorAuthor

Also related to#598

@BrunoQuaresmaBrunoQuaresma mentioned this pull requestApr 25, 2022
17 tasks
Copy link
Member

@johnstcnjohnstcn left a comment
edited
Loading

Choose a reason for hiding this comment

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

The change looks good to me (excepting the failed unit tests), but I'm confused as to why we're now creating auser_status column instead of asuspended column as was originally discussedhere.

What kind of user statuses do we plan to have besides "active" and "suspended"?
If these are the only we currently have planned, would it be simpler to have a boolean columnsuspended with a default value offalse?

@@ -28,12 +28,20 @@ type UsersRequest struct {
Offset int `json:"offset"`
}

type UserStatus string
Copy link
Member

Choose a reason for hiding this comment

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

Instead ofUserStatus I'd be more in favor of@johnstcn's suggestion to usesuspended as a boolean. Because we only have two statuses for now, it feels weird to make it generic.

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

There is this conversation herehttps://codercom.slack.com/archives/C014JH42DBJ/p1650895472652489?thread_ts=1650895472.652489&cid=C014JH42DBJ but I'm good using both.

Ah, I missed parts of that thread. I'm fine either way honestly.

Copy link
Member

Choose a reason for hiding this comment

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

@kylecarbs@johnstcn I think we will have more statuses likedormant

johnstcn reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

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

Could a user bedormant andsuspended?

Copy link
Member

Choose a reason for hiding this comment

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

@kylecarbs I believe the user would just besuspended.

-- Just my take --
Onlyactive users count towards the licensed seats. Adormant user is "inactive" based on activity. Adormant user can reactive themselves by just being active again. (Maybe they have to do some more steps, idk).

Asuspended user cannot even log in. Their account must be reactivated by an admin. The user has 0 input on this.

@BrunoQuaresmaBrunoQuaresma merged commit441ffd6 intomainApr 26, 2022
@BrunoQuaresmaBrunoQuaresma deleted the bq/suspend-user branchApril 26, 2022 14:00
@missknissmisskniss added this to theV2 Beta milestoneMay 15, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@EmyrkEmyrkEmyrk left review comments

@coadlercoadlercoadler left review comments

@kylecarbskylecarbskylecarbs left review comments

@presleyppresleyppresleyp approved these changes

Assignees

@BrunoQuaresmaBrunoQuaresma

Labels
None yet
Projects
None yet
Milestone
V2 Beta
Development

Successfully merging this pull request may close these issues.

7 participants
@BrunoQuaresma@presleyp@johnstcn@Emyrk@coadler@kylecarbs@misskniss

[8]ページ先頭

©2009-2025 Movatter.jp