on 10-14-2020 3:14 PM
Hi All,
I have a requirement to see orders specific to one site in backoffice for a particular user.
I am running multiple sites on single hybris instance.
Now I would like to restrict orders specific to one site for a particular user.
I have used below search restrivtion impex, but its not working for me :
INSERT_UPDATE SearchRestriction;code[unique=true];name[lang=en];query;principal(UID);restrictedType(code);active;generate
;orderVisibilityForSiteX;;{item.site} IN ({{SELECT {site.pk} FROM {BaseSite as site} WHERE {site.uid} = 'xSiteUID'}});'myUserGroup';Order;true;true
Any help is appreciated !
Thanks in advance!
Hi sidjainey ,
May I know how did you resolve the admin group issue ? and added restriction to admin group ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The restriction seems fine somehow, we used similar to restrict based on store and it worked fine.
;orderVisibilityForStoreX;"Restricts Order by store ";"{store} IN ({{SELECT {bs.pk} FROM {BaseStore as bs} where {bs.uid}='$storeUid'}})";myUserGroup;Order;true;
Only minor differences i found are:
Instead of item.site, try only site or item:site.
No need to give quotes for usergroup in impex.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ruchi,
Thanks for your answer.
I figured out the issue. Yes, you are right that code is fine.
The problem was, myUsergroup belongs to admingroup. Since, restrictions doesn't apply to admingroups user. Hence restrictions were not working for me.
Create search restriction on the user or user group to view only specific site
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.