Skip to content

Commit

Permalink
20619 (#3099)
Browse files Browse the repository at this point in the history
* 20619 - update allowable actions

* 20619 - fix unit test

* 20619 - fix unit test

* 20619 - fix unit test
  • Loading branch information
ketaki-deodhar authored Nov 28, 2024
1 parent c0e5d80 commit 5a232c8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
8 changes: 5 additions & 3 deletions legal-api/src/legal_api/services/authz.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ def get_allowable_filings_dict():
'blockerChecks': {
'warningTypes': [WarningType.MISSING_REQUIRED_BUSINESS_INFO],
'business': [BusinessBlocker.DEFAULT,
BusinessBlocker.NOT_IN_GOOD_STANDING,
BusinessBlocker.IN_DISSOLUTION]
}
},
Expand Down Expand Up @@ -373,7 +372,9 @@ def get_allowable_filings_dict():
'alteration': {
'legalTypes': ['BC', 'BEN', 'ULC', 'CC', 'C', 'CBEN', 'CUL', 'CCC'],
'blockerChecks': {
'business': [BusinessBlocker.DEFAULT, BusinessBlocker.IN_DISSOLUTION],
'business': [BusinessBlocker.DEFAULT,
BusinessBlocker.NOT_IN_GOOD_STANDING,
BusinessBlocker.IN_DISSOLUTION],
'invalidStateFilings': ['restoration.limitedRestoration',
'restoration.limitedRestorationExtension']
}
Expand Down Expand Up @@ -471,7 +472,8 @@ def get_allowable_filings_dict():
'specialResolution': {
'legalTypes': ['CP'],
'blockerChecks': {
'business': [BusinessBlocker.DEFAULT]
'business': [BusinessBlocker.DEFAULT,
BusinessBlocker.NOT_IN_GOOD_STANDING]
}
},
'transition': {
Expand Down
35 changes: 17 additions & 18 deletions legal-api/tests/unit/services/test_authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,7 @@ def mock_auth(one, two): # pylint: disable=unused-argument; mocks of library me
FilingKey.COD_CP,
FilingKey.CORRCTN,
FilingKey.COURT_ORDER,
FilingKey.VOL_DISS,
FilingKey.ADM_DISS,
FilingKey.REGISTRARS_NOTATION,
FilingKey.REGISTRARS_ORDER,
Expand All @@ -1547,6 +1548,7 @@ def mock_auth(one, two): # pylint: disable=unused-argument; mocks of library me
FilingKey.COD_CORPS,
FilingKey.CORRCTN,
FilingKey.COURT_ORDER,
FilingKey.VOL_DISS,
FilingKey.ADM_DISS,
FilingKey.REGISTRARS_NOTATION,
FilingKey.REGISTRARS_ORDER,
Expand All @@ -1560,6 +1562,7 @@ def mock_auth(one, two): # pylint: disable=unused-argument; mocks of library me
FilingKey.COD_CORPS,
FilingKey.CORRCTN,
FilingKey.COURT_ORDER,
FilingKey.VOL_DISS,
FilingKey.ADM_DISS,
FilingKey.REGISTRARS_NOTATION,
FilingKey.REGISTRARS_ORDER,
Expand All @@ -1571,6 +1574,7 @@ def mock_auth(one, two): # pylint: disable=unused-argument; mocks of library me
FilingKey.CONV_FIRMS,
FilingKey.CORRCTN_FIRMS,
FilingKey.COURT_ORDER,
FilingKey.VOL_DISS_FIRMS,
FilingKey.ADM_DISS_FIRMS,
FilingKey.REGISTRARS_NOTATION,
FilingKey.REGISTRARS_ORDER])),
Expand All @@ -1579,18 +1583,15 @@ def mock_auth(one, two): # pylint: disable=unused-argument; mocks of library me
('general_user_cp', True, Business.State.ACTIVE, ['CP'], 'general', [BASIC_USER],
expected_lookup([FilingKey.AR_CP,
FilingKey.COA_CP,
FilingKey.COD_CP,
FilingKey.SPECIAL_RESOLUTION])),
FilingKey.COD_CP])),
('general_user_corps', True, Business.State.ACTIVE, ['BC', 'BEN', 'CC', 'ULC'], 'general', [BASIC_USER],
expected_lookup([FilingKey.ALTERATION,
FilingKey.AR_CORPS,
expected_lookup([FilingKey.AR_CORPS,
FilingKey.COA_CORPS,
FilingKey.COD_CORPS,
FilingKey.TRANSITION])),
('general_user_continue_in_corps', True, Business.State.ACTIVE, ['C', 'CBEN', 'CCC', 'CUL'], 'general',
[BASIC_USER],
expected_lookup([FilingKey.ALTERATION,
FilingKey.AR_CORPS,
expected_lookup([FilingKey.AR_CORPS,
FilingKey.COA_CORPS,
FilingKey.COD_CORPS,
FilingKey.TRANSITION])),
Expand Down Expand Up @@ -2635,8 +2636,7 @@ def mock_auth(one, two): # pylint: disable=unused-argument; mocks of library me
('general_user_cp', True, Business.State.ACTIVE, ['CP'], 'general', [BASIC_USER],
expected_lookup([FilingKey.AR_CP,
FilingKey.COA_CP,
FilingKey.COD_CP,
FilingKey.SPECIAL_RESOLUTION])),
FilingKey.COD_CP])),
('general_user_corps', True, Business.State.ACTIVE, ['BC', 'BEN', 'CC', 'ULC'], 'general', [BASIC_USER],
expected_lookup([FilingKey.AR_CORPS,
FilingKey.COA_CORPS,
Expand Down Expand Up @@ -2709,6 +2709,7 @@ def mock_auth(one, two): # pylint: disable=unused-argument; mocks of library me
FilingKey.COD_CP,
FilingKey.CORRCTN,
FilingKey.COURT_ORDER,
FilingKey.VOL_DISS,
FilingKey.ADM_DISS,
FilingKey.REGISTRARS_NOTATION,
FilingKey.REGISTRARS_ORDER,
Expand All @@ -2722,6 +2723,7 @@ def mock_auth(one, two): # pylint: disable=unused-argument; mocks of library me
FilingKey.COD_CORPS,
FilingKey.CORRCTN,
FilingKey.COURT_ORDER,
FilingKey.VOL_DISS,
FilingKey.ADM_DISS,
FilingKey.REGISTRARS_NOTATION,
FilingKey.REGISTRARS_ORDER,
Expand Down Expand Up @@ -2763,6 +2765,7 @@ def mock_auth(one, two): # pylint: disable=unused-argument; mocks of library me
FilingKey.COD_CORPS,
FilingKey.CORRCTN,
FilingKey.COURT_ORDER,
FilingKey.VOL_DISS,
FilingKey.ADM_DISS,
FilingKey.REGISTRARS_NOTATION,
FilingKey.REGISTRARS_ORDER,
Expand All @@ -2783,19 +2786,15 @@ def mock_auth(one, two): # pylint: disable=unused-argument; mocks of library me
('general_user_cp', Business.State.ACTIVE, ['CP'], 'general', [BASIC_USER], None,
expected_lookup([FilingKey.AR_CP,
FilingKey.COA_CP,
FilingKey.COD_CP,
FilingKey.SPECIAL_RESOLUTION])),
FilingKey.COD_CP])),
('general_user_corps', Business.State.ACTIVE, ['BC', 'BEN', 'CC', 'ULC'], 'general', [BASIC_USER], None,
expected_lookup([
FilingKey.ALTERATION,
FilingKey.AR_CORPS,
FilingKey.COA_CORPS,
FilingKey.COD_CORPS,
FilingKey.TRANSITION])),
expected_lookup([FilingKey.AR_CORPS,
FilingKey.COA_CORPS,
FilingKey.COD_CORPS,
FilingKey.TRANSITION])),
('general_user_continue_in_corps', Business.State.ACTIVE, ['C', 'CBEN', 'CCC', 'CUL'], 'general', [BASIC_USER],
None,
expected_lookup([FilingKey.ALTERATION,
FilingKey.AR_CORPS,
expected_lookup([FilingKey.AR_CORPS,
FilingKey.COA_CORPS,
FilingKey.COD_CORPS,
FilingKey.TRANSITION])),
Expand Down

0 comments on commit 5a232c8

Please sign in to comment.