MCPcopy Index your code
hub / github.com/coder/coder / scimUserStatus

Function scimUserStatus

enterprise/coderd/scim.go:524–541  ·  view source on GitHub ↗

nolint:revive // active is not a control flag

(user database.User, active bool)

Source from the content-addressed store, hash-verified

522
523//nolint:revive // active is not a control flag
524func scimUserStatus(user database.User, active bool) database.UserStatus {
525 if !active {
526 return database.UserStatusSuspended
527 }
528
529 switch user.Status {
530 case database.UserStatusActive:
531 // Keep the user active
532 return database.UserStatusActive
533 case database.UserStatusDormant, database.UserStatusSuspended:
534 // Move (or keep) as dormant
535 return database.UserStatusDormant
536 default:
537 // If the status is unknown, just move them to dormant.
538 // The user will get transitioned to Active after logging in.
539 return database.UserStatusDormant
540 }
541}

Callers 2

scimPatchUserMethod · 0.85
scimPutUserMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected