Skip to main content

Offboarding API Operations

Summary

Offboarding is a monolith MVC controller API. It supports self-service creation and history, visible pending work, approval/rejection, rollback decisions, eligible access-revoke processing, workspace projection, and a legacy generic exit save operation.

Audience

Developers, QA, support, security reviewers, and solution architects.

Operation families

FamilyVerified behavior
Self-serviceCreate exit request, list own requests, request rollback
Manager/administratorList visible pending exits, approve, reject, decide rollback
Access operationsList eligible overdue exits and process user/labor deactivation
WorkspaceReturns visible exit records alongside other HR Operations data
LegacyCreates or updates an exit record using the entity-shaped input

Authorization and tenancy

All operations inherit controller authentication. Action logic checks current user, permissions, roles, employee ownership, reporting/visibility scope, and tenant-filtered records. The pending list does not expose a separate explicit permission check but obtains its target set from the exit visibility helper.

Validation and state

Creation requires a reason, derives resignation date server-side, applies configured/default notice duration, rejects a last-working date before resignation, and blocks another active request. Decisions and rollbacks enforce current states. Access revoke selects approved records whose effective last-working date has passed.

Response behavior

Successful mutations return the persisted exit entity except access-revoke processing, which returns a processed count. Read operations return bounded lists. Controller actions use bad-request, forbidden, and not-found results for verified failure conditions.

Partial-failure boundary

Access revoke updates user, labor, exit, and audit state in one monolith context save, but missing linked records are tolerated. Exit approval is saved before the internal notification call, so a notification failure is outside the state commit.

Requires confirmation

  • Continued support and intended consumers of the legacy exit save operation.
  • Whether pending-list access needs an explicit named permission.
  • Required asset, payroll, and clearance preconditions before access revoke.
  • Retry behavior when exit approval notification fails.

Source References

  • Controllers/HrOperationsController.cs
  • Models/ExitRequest.cs
  • Models/ExitRequestAuditLog.cs
  • Data/AppDbContext.cs
  • UI/salary-ui/apps/client-hrms-portal/src/pages/hr/HrOperationsPage.tsx

See Also

Keywords

  • Exit request
  • Rollback decision
  • Access revoke

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-20
  • Review cycle: Quarterly