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
Namerequest UI: Affiliate Name Request with Selected Account for Non-Staff Logins in Namex #26498
A client may have multiple accounts. The Name Request should be associated with the selected account for non-staff clients as well, ensuring proper affiliation and access control.
For example, in the TEST environment, log in as BCREGA004. This client has multiple accounts. When switching to a different account and creating an NR, the Name Request should be associated with the selected account.
changed the title [-]Namex: Affiliate Name Request with Selected Account for Non-Staff Logins in Namex[/-][+]Namerequest UI: Affiliate Name Request with Selected Account for Non-Staff Logins in Namex[/+]on Mar 13, 2025
select a different account from the account menu, there is an error:
The second issue is no longer present in TEST, as the code has been rolled back. It occurred when Auth passed an account ID to Name Request, which then attempted to affiliate the account with the new NR. When returning to the business side, the same error reoccurred.
The likely cause is that the session variable CURRENT_ACCOUNT does not match the account number the NR is affiliated with. Selecting an account does not update the CURRENT_ACCOUNT value in the session. However, Name Request is not supposed to manage CURRENT_ACCOUNT—it should only read it.
select a different account from the account menu, there is an error:
I believe this is expected, since the new account isn't affiliated to the subject IA. Users should not change accounts while looking at a business or IA.
The sbc-common-components package was updated to reset current_account when the account is switched. However, integration with the latest version caused errors due to incompatible code changes, including—but not limited to—path resolution issues and runtime exceptions:
Module not found: Error: Can't resolve '@/util/constants' in '/root/repos/namerequest/app/node_modules/sbc-common-components/src/components'
ERROR in node_modules/sbc-common-components/src/stores/account.ts:88:39
TS2339: Property 'response' does not exist on type 'unknown'.
86 | return userProfile
87 | } catch (error) {
ERROR in node_modules/sbc-common-components/src/util/interceptors.ts:7:43
TS2339: Property 'env' does not exist on type 'ImportMeta'.
5 | export function addAxiosInterceptors (axiosInstance: AxiosInstance): AxiosInstance {
6 | axiosInstance.interceptors.request.use(config => {
These are Typescript errors under node_modules, the newest sbc-common-components is using Pinia too which I don't think your project has. It's using Vuex? Also project is still using vue-cli-service which is dead, should probably migrate that to Vite this seemed to get rid of alot of the typescript errors under the node_modules
@OlgaPotiagalova Are you OK with this ticket being deferred? Do you want our team to have a quick look at this, since we have a bit of experience with multiple accounts?
Activity
[-]Namex: Affiliate Name Request with Selected Account for Non-Staff Logins in Namex[/-][+]Namerequest UI: Affiliate Name Request with Selected Account for Non-Staff Logins in Namex[/+]eve-git commentedon Mar 13, 2025
In test environment, 4 accounts associate with the user BCREGA004:
ozamani9gh commentedon Mar 21, 2025
@eve-git when do you think we can get this in TEST so Mihai and entities team can confirm its fixed
eve-git commentedon Apr 17, 2025
There are two issues:
Steps for the first issue:
in My Business Registry
click "Get Started with a BC Based Business"
try to create a numbered company
click "Incorporate Now"
it shows the page:
select a different account from the account menu, there is an error:
The second issue is no longer present in TEST, as the code has been rolled back. It occurred when Auth passed an account ID to Name Request, which then attempted to affiliate the account with the new NR. When returning to the business side, the same error reoccurred.
The likely cause is that the session variable CURRENT_ACCOUNT does not match the account number the NR is affiliated with. Selecting an account does not update the CURRENT_ACCOUNT value in the session. However, Name Request is not supposed to manage CURRENT_ACCOUNT—it should only read it.
severinbeauvais commentedon Apr 17, 2025
I believe this is expected, since the new account isn't affiliated to the subject IA. Users should not change accounts while looking at a business or IA.
The original issue was that navigating from the BRD while using a non-default account (eg, https://dev.business-registry-dashboard.bcregistry.gov.bc.ca/account/2288) to Namerequest UI didn't retain the account id.
This still doesn't work: https://dev.names.bcregistry.gov.bc.ca/2288
But this works: https://dev.names.bcregistry.gov.bc.ca/?accountid=2288
To fix the above, talk to @JazzarKarim about changing the target URL.
Meanwhile, changing the account while in Namerequest UI seems to work fine.
8 remaining items
eve-git commentedon Jun 13, 2025
The sbc-common-components package was updated to reset current_account when the account is switched. However, integration with the latest version caused errors due to incompatible code changes, including—but not limited to—path resolution issues and runtime exceptions:
Module not found: Error: Can't resolve '@/util/constants' in '/root/repos/namerequest/app/node_modules/sbc-common-components/src/components'
ERROR in node_modules/sbc-common-components/src/stores/account.ts:88:39
TS2339: Property 'response' does not exist on type 'unknown'.
86 | return userProfile
87 | } catch (error) {
TS2339: Property 'env' does not exist on type 'ImportMeta'.
5 | export function addAxiosInterceptors (axiosInstance: AxiosInstance): AxiosInstance {
6 | axiosInstance.interceptors.request.use(config => {
All of them require code changes in sbc-common-components...
severinbeauvais commentedon Jun 16, 2025
@seeker25 ^^ Thoughts? Are there both a Vue version and a Nuxt version of sbc-c-c?
seeker25 commentedon Jun 16, 2025
These are Typescript errors under
node_modules, the newestsbc-common-componentsis usingPiniatoo which I don't think your project has. It's usingVuex? Also project is still usingvue-cli-servicewhich is dead, should probably migrate that toVitethis seemed to get rid of alot of the typescript errors under thenode_modulesozamani9gh commentedon Jun 17, 2025
blocked until Name Request is written in Nuxt/Pinia
severinbeauvais commentedon Jun 17, 2025
@OlgaPotiagalova Are you OK with this ticket being deferred? Do you want our team to have a quick look at this, since we have a bit of experience with multiple accounts?
ozamani9gh commentedon Jul 24, 2025
@eve-git @EPortman Vikas is hoping we can complete this within August:
thorwolpert commentedon Jul 27, 2026
stale - new issue can be opened if needed