Skip to content

Restcomm 2497: implement suspend account#2904

Open
ddhuy wants to merge 7348 commits intoRestComm:masterfrom
ddhuy:restcomm_2497
Open

Restcomm 2497: implement suspend account#2904
ddhuy wants to merge 7348 commits intoRestComm:masterfrom
ddhuy:restcomm_2497

Conversation

@ddhuy
Copy link

@ddhuy ddhuy commented Apr 7, 2018

What this PR does / why we need it:
Currently we can only update an account to Closed state, which means all related resources (DIDs, Clients etc) will be removed and Account will be inactive.
From this state there is no way to get back to Active.

For this reason we need to implement the Suspended state which means, Account and account's resources (DIDs, Clients etc) cannot operate but are not deleted. At any time a Suspended account can move to either Active or Closed state

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #2497

Special notes for your reviewer:
Following regression tests are added as @gsaslis recommend:

  • No REST API request is allowed for a SUSPENDED account. Account cannot login, create calls, search DID etc.
  • All resources (apps, clients, DIDs etc) are suspended and cannot be used. Clients cannot be registered, DID numbers return 403
  • All sub-accounts of the account and their resources are also suspended and cannot be used.
  • The Account, Sub-Accounts and all related resources still exist / are not removed from db.
  • A suspended account can move to either CLOSED state or to ACTIVE state again.
  • Moving to ACTIVE state means that Account and sub-accounts are active and can be used again, same for all related resources.
  • Moving to CLOSED state means that Account, sub-accounts and related resources are closed forever and will be never used again. External resources like, purchased DID number will be released (so no more costs) but everything else (account, sub-account, resources) will remain in the DB for audit purposes.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement new Account State Suspended

9 participants