Reputation: 11
I created a new usergroup but i'm trying to view the product node and i dont have permisions for read and write that.
I tried to add permissions using this but is not working.
$START_USERRIGHTS; ; ; ; ; ; ; ; ;
Type ; UID ; MemberOfGroups ; Password ; Target ; read ; change ; create ; remove ; change_perm
UserGroup ; xxxxxxxxxxxRole ; ; ; ; ; ; ; ;
; ; ; ; Category ; + ; + ; + ; + ;
; ; ; ; Product ; + ; + ; + ; + ;
; ; ; ; BaseStore ; + ; + ; + ; + ;
; ; ; ; CronJob ; + ; + ; + ; + ;
; ; ; ; Job ; + ; + ; + ; + ;
$END_USERRIGHTS; ; ; ; ;
Upvotes: 1
Views: 886
Reputation: 40
The new usergroup newUserGroup
should be given a read access (or even a write access if required) to the productCatalogVersion
in which the members of that group will be able to view (read) the products details of that catalog version (Staged or Online, etc ..)
Here is an example of impex to give newUserGroup
read access and write access to XYZ_ProductCatalog
INSERT_UPDATE CatalogVersion; catalog(id)[unique = true]; version[unique = true]; readPrincipals(uid)[mode = append]; writePrincipals(uid)[mode = append]
; XYZ_ProductCatalog ; Staged ; newUserGroupUID ; newUserGroupUID
; XYZ_ProductCatalog ; Online ; newUserGroupUID ; newUserGroupUID
You may modify the above impex to suit your use case.
Upvotes: 0
Reputation: 1248
Simple UserGroup is not respected by backoffice ,to support this create new backoffice role.
A BackofficeRole is an extension of UserGroup that is meant to be used for restricting access in Backoffice (i.e. UI configuration context defines an dimension called principal which actually work exactly on BackofficeRoles). It also introduces an attribute called authorities which extends restriction possibilities (i.e. widget access may be restricted only to specified authorities) - user may use only one role at the moment, but different roles may have same authorities.
You cannot use simple UserGroup then - it will not be respected by Backoffice.
Below you may find examples of restriction capabilities:
<context type="Product" component="myComponent" principal="user1">
...
</context>
<context type="Product" component="myComponent" principal="backofficeRole1">
...
</context>
<widget id="someWidget" widgetDefinitionId="com.hybris.someWidget"
access="backofficeRole1" />
<widget id="someWidget" widgetDefinitionId="com.hybris.someWidget"
access="authority1" />
Upvotes: 2