Archive manual users on remove
Switch remove-user behavior for manually managed profiles from hard\ndelete to archival by deactivating the profile. This matches the\nrequested SCIM-like lifecycle while avoiding dependency errors for\nlinked records such as signatures and assets.\n\nThe remove flow now updates profile state to INACTIVE, updates\nmembership timestamps, and emits a user-updated webhook event instead of\ndelete events. E2E coverage now asserts that remove keeps the profile\nand marks it inactive. Signed-off-by: Cursor Agent <cursoragent@cursor.com>
This commit is contained in:
committed by
Bryan Frimin
parent
ffa3db3cd2
commit
b50bbc8d6a
@@ -169,18 +169,6 @@ func (e ErrLastActiveOwner) Error() string {
|
||||
return fmt.Sprintf("cannot remove profile %q: last active owner of the organization", e.MembershipID)
|
||||
}
|
||||
|
||||
type ErrUserReferencedByRecords struct {
|
||||
ProfileID gid.GID
|
||||
}
|
||||
|
||||
func NewUserReferencedByRecordsError(profileID gid.GID) error {
|
||||
return &ErrUserReferencedByRecords{ProfileID: profileID}
|
||||
}
|
||||
|
||||
func (e ErrUserReferencedByRecords) Error() string {
|
||||
return "cannot remove user because they are referenced by existing records (for example signatures, tasks, assets, or risks)"
|
||||
}
|
||||
|
||||
type ErrOrganizationNotFound struct{ OrganizationID gid.GID }
|
||||
|
||||
func NewOrganizationNotFoundError(organizationID gid.GID) error {
|
||||
|
||||
Reference in New Issue
Block a user