on ‎2019 Dec 15 4:09 PM
Hello,
How i can apply restriction for login user on BackOffice if i want to see only orders for specific site/store? and to see just customers already registered on specific site/store?
For Example: Let's see i 2 sites (A & B) and both of them on the same database schema and i want to let A's employees to access the BackOffice and see only A's orders and A's registered customers. and the same for B site.
Request clarification before answering.
Hello, Saleh.
You can use SearchRestriction as a solution, e.g.:
INSERT_UPDATE SearchRestriction;code[unique=true];name[lang=en];query;principal(UID);restrictedType(code);active;generate
;orderVisibilitySiteA;;{item.site} IN ({{SELECT {site.pk} FROM {BaseSite as site} WHERE {site.uid} = 'siteAUid'}});myEmployeeGroupA;Order;true;trueSame should be done for second employee group. Order also has OOTB store property that you can use.
As for Customers, you can add new property to hold either site or a store and use identical search restriction but change restrictedType to Customer and tweak the query a little bit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sidjainey, Yes it worked as expected. Can you please share you configuration to check it for you?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot! I will try it and let you know if i faced any issue 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 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.