You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Legal API: add permission checks (instead of KC role checks) to filings - Step 1 #27211
Currently, the API uses "allowable actions" to allow/deny actions (like filings) depending on business type, business state, filing type, and whether the user is staff or not (according to KC roles).
However, other types of accounts were recently implemented. The allowable actions should now look at permissions (which are already set according to account type) to determine whether to allow/deny certain filings for the current user.
Basically, this is a combination of allowable actions + authorized actions (aka permissions).
This is to protect the Legal API (and everything behind it) from unauthorized filings. For MVP, the UIs will prevent these, but it may be possible (eg, external API users) to circumvent this. We definitely need to do this but I think it's low risk for now.
A large discussion about Authorized Actions vs Allowable Actions, and STAFF vs SYSTEM roles, had taken place in ticket #28599 -- see comments starting on May 26.
I believe THIS is the ticket to continue that conversation.
changed the title [-]Legal API: add role checks (priority 1)[/-][+]Legal API: add permission checks (instead of KC role checks) to filings (priority 1)[/+]on Jul 29, 2025
@vysakh-menon-aot I've updated this ticket's description. I think this ticket should be worked on before the others. What do you think about the proposed changes and priority?
changed the title [-]Legal API: add permission checks (instead of KC role checks) to filings (priority 1)[/-][+]Legal API: add permission checks (instead of KC role checks) to filings [/+]on Aug 12, 2025
changed the title [-]Legal API: add permission checks (instead of KC role checks) to filings [/-][+]Legal API: add permission checks (instead of KC role checks) to filings - Step 1[/+]on Aug 20, 2025
Activity
[-]Legal API: add role check[/-][+]Legal API: add role checks[/+][-]Legal API: add role checks[/-][+]Legal API: add role checks (FUTURE?)[/+][-]Legal API: add role checks (FUTURE?)[/-][+]Legal API: add role checks (future?)[/+]severinbeauvais commentedon May 9, 2025
I think we can do this after initial MVP.
This is to protect the Legal API (and everything behind it) from unauthorized filings. For MVP, the UIs will prevent these, but it may be possible (eg, external API users) to circumvent this. We definitely need to do this but I think it's low risk for now.
@OlgaPotiagalova
[-]Legal API: add role checks (future?)[/-][+]Legal API: add role checks (future)[/+]severinbeauvais commentedon May 27, 2025
A large discussion about Authorized Actions vs Allowable Actions, and STAFF vs SYSTEM roles, had taken place in ticket #28599 -- see comments starting on May 26.
I believe THIS is the ticket to continue that conversation.
cc: @argush3 @thorwolpert @chenhongjing @seeker25
[-]Legal API: add role checks (future)[/-][+]Legal API: add role checks (P1)[/+]1 remaining item
[-]Legal API: add role checks (priority 1)[/-][+]Legal API: add permission checks (instead of KC role checks) to filings (priority 1)[/+]severinbeauvais commentedon Jul 29, 2025
@vysakh-menon-aot I've updated this ticket's description. I think this ticket should be worked on before the others. What do you think about the proposed changes and priority?
Rajandeep98 commentedon Jul 31, 2025
implementing locally for now
Rajandeep98 commentedon Aug 6, 2025
Rajandeep98 commentedon Aug 11, 2025
QA Notes:
Allowed Users shouldnt see this message:
[-]Legal API: add permission checks (instead of KC role checks) to filings (priority 1)[/-][+]Legal API: add permission checks (instead of KC role checks) to filings [/+]Rajandeep98 commentedon Aug 19, 2025
riyazuddinsyed commentedon Aug 20, 2025
Verified in test.Working as expected.
[-]Legal API: add permission checks (instead of KC role checks) to filings [/-][+]Legal API: add permission checks (instead of KC role checks) to filings - Step 1[/+]