Mykola Zatonatskiy
Mykola Zatonatskiy

Reputation: 349

How to request and make active particular page if you are staying on the same route?

I have an issue with a proper refresh of the Spartacus page.

Little bit more details: On our app we can change the company while using the application. It means when a user logs in he could have 1,2,5,10,20 or any other quantity of companies and each company has it is own scope visibility rules. When the user using (just for example) companyA, he can see the productA, but when he switches to company B he shouldn't see the productA but should see the not-found page (404). And the same but from another side. It means when the user is using company B and tries to see the productA he should see the 404 page but when he changes the company he should see the productA.

At this moment, after switching the company, the application tries to redownload the same page. It means when the user with company A try to see the product page with a productA by url - product/productA/productAName the Spartacus returns the proper page with all the data. But when the user switches the company to company B, he receives an error because current company do not have some permissions or scope rules to see the productA. And when the user is using the company B and try to get the productA page, he receive and error and not-found page is downloaded and showing. But if we try to switch the unit still not-found page is requested instead of the product page

So here is the question. How to request and make active some particular page if you are staying on the same route? It means how I could request and make active the not-found page if I do not have such product page for particular product and how I have to request the product page if previously I receive not-found page without changing the route.

Upvotes: 0

Views: 60

Answers (0)

Related Questions