I'm working on multishop website. I can assign rights to specific webshops to specific users, so they can only see "their" shops in backend after log in.
Can I retreive this "rights" (shops IDs) in front end based on fx. user ID in Razor?
Yes, I can see, that these information are stored in TeaCommerce_Permission table, but maybe there is something ready?
We don't have an API method to give the store id's that a logged in umbraco user has access to. An Umbraco user is not the same as a member. So how are you using the Umbraco users in the front end of your website?
You can loop all stores using the StoreService.Instance and then use the PermissionService (in infrasturcture/Security) to get the permissions and use HasPermission
The thing is, that "system" will be open only for salesmen, which also have to had access to TeaCommerce backend. But this is not a problem any longer.
Retreive user rights to webshops
Hi,
Umbraco 6.1.6, TC 2.2.2.
I'm working on multishop website. I can assign rights to specific webshops to specific users, so they can only see "their" shops in backend after log in.
Can I retreive this "rights" (shops IDs) in front end based on fx. user ID in Razor?
Yes, I can see, that these information are stored in TeaCommerce_Permission table, but maybe there is something ready?
Kind regards
Thomas
Hi Thomas
We don't have an API method to give the store id's that a logged in umbraco user has access to. An Umbraco user is not the same as a member. So how are you using the Umbraco users in the front end of your website?
You can loop all stores using the StoreService.Instance and then use the PermissionService (in infrasturcture/Security) to get the permissions and use HasPermission
Kind regards
Anders
Hi Anders,
The thing is, that "system" will be open only for salesmen, which also have to had access to TeaCommerce backend. But this is not a problem any longer.
Thank you for reply anyway
Kind regards
Thomas
Cool. Feel free to suggest us any new features that might have made your life easier in your situation!
/Rune
There is no new features. I have used umbraco login and - on frontend - I'm checking logged user this way:
and retreiving webshops IDs direct from database:
/Thomas
is working on a reply...