cancel
Showing results for 
Search instead for 
Did you mean: 

How to create the user role for displaying the site and store specific values in Backoffice

Former Member
0 Kudos
2,080

HI Experts,

I want to display the particular store and site specific data in Backoffice when particular user role user logged in Multi Country Site.

Please guide and help me.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi ,

Follow below steps:

Import below impex

$passwordEncoding = md5 $defaultPassword = 1234 $setPassword = @password[translator = de.hybris.platform.impex.jalo.translators.ConvertPlaintextToEncodedUserPasswordTranslator][default = '$passwordEncoding:$defaultPassword']

INSERT_UPDATE BackofficeRole;UID[unique=true];locname[lang=en];backOfficeLoginDisabled;authorities ;sitestorecmsmanagerrole;Backoffice CMS Manager role;FALSE;sitestorecmsmanagerrole

INSERT_UPDATE PrincipalGroupRelation;source(uid)[unique=true];target(uid)[unique=true] ;basecmsmanagergroup;sitestorecmsmanagerrole

INSERT_UPDATE Usergroup;uid[unique=true];groups(uid)[mode=append];name ;sitestorebackofficegroup;sitestorecmsmanagerrole;Backoffice Site Store group

$START_USERRIGHTS;;;;;;;;; Type;UID;MemberOfGroups;Password;Target;read;change;create;remove;change_perm UserGroup;sitestorebackofficegroup;sitestorecmsmanagerrole;;;;;;;

;;;;CMSSite;+;+;-;-;; ;;;;BaseStore;+;+;-;-;;

$END_USERRIGHTS;;;;;

INSERT_UPDATE Employee; uid[unique = true]; $setPassword; name; description; groups(uid); sessionLanguage(isocode); sessionCurrency(isocode); backOfficeLoginDisabled ; backoffice/user ; ; CMS Manager ; Manager capable of creating / editing site and store ; sitestorebackofficegroup ; ; ; false

In your custom backoffice extension, paste below lines.

Do ant all and restart the server.

Refer below screenshot for your reference

Answers (1)

Answers (1)

vinay_malempati
Active Participant

You need to first give the access to the required types for the user group something like below impex $writableCatalogVersions=customContentCatalog:Staged,customContentCatalog:Online,customSalesProductCatalog:Staged,customSalesProductCatalog:Online,customClassificationCatalog:1.0

 INSERT_UPDATE Usergroup;uid[unique=true];groups(uid)[mode=append];locname[lang=en];writableCatalogVersions(catalog(id),version)
 ;productmanagergroup;backofficeadmingroup,employeegroup;"Product Manager Group";$writableCatalogVersions
 
 INSERT_UPDATE BackofficeRole;UID[unique=true];locname[lang=en];backOfficeLoginDisabled;authorities
 ;productmanagerrole;Product Manager Role;FALSE;productmanagerrole
 
 INSERT_UPDATE PrincipalGroupRelation;source(uid)[unique=true];target(uid)[unique=true]
 ;productmanagergroup;productmanagerrole
 
 INSERT_UPDATE Employee;UID[unique=true];password;description;name;groups(uid);sessionLanguage(isocode);sessionCurrency(isocode)
 ;productmanager;;productmanager;productmanager;productmanagergroup;en;THB
 
 $START_USERRIGHTS;;;;;;;;;
 Type;UID;MemberOfGroups;Password;Target;read;change;create;remove;change_perm
 UserGroup;productmanagergroup;backofficeadmingroup,employeegroup;;;;;;;
 
 # Access Rights for Products & Catalog;;;;;;;;;
 ;;;;WorkFlowAction;+;+;+;;;
 ;;;;Media;+;+;+;;;
 ;;;;MediaFolder;+;+;+;;;
 ;;;;MediaContainer;+;+;+;;;
 ;;;;MediaFormat;+;+;+;;;
 ;;;;MediaContext;+;+;+;;;
 ;;;;ConversionGroup;+;+;+;;;
 ;;;;AbstractCMSComponentContainer;+;;;;;
 ;;;;Category;+;+;+;;;
 ;;;;Keyword;+;+;;;;
 ;;;;Product;+;+;+;;;
 ;;;;ProductReference;+;+;+;;;
 ;;;;Unit;+;+;;;;
 ;;;;Wishlist2;+;;;;; 
 ;;;;PriceRow;+;;;;;
 ;;;;TaxRow;+;;;;;
 ;;;;ProductFeature;+;+;+;;;
 ;;;;ProductDiscountGroup;+;;;;;
 ;;;;ProductPriceGroup;+;;;;;
 ;;;;ProductTaxGroup;+;;;;;
 ;;;;DiscountRow;+;;;;;
 ;;;;Discount;+;;;;;
 ;;;;Product.approvalStatus;+;+;+;;;
 ;;;;EnumerationValue;+;;;;;
 ;;;;CatalogVersion;+;;;;;
 ;;;;Catalog;+;;;;;
 ;;;;ClassificationClass;+;+;+;;;
 ;;;;SavedValues;+;;;;;
 ;;;;DeliveryMode;+;;;;;
 ;;;;ProductPromotion;+;;;;;
 ;;;;Customer;+;;;;;
 ;;;;Employee;+;;;;;
 ;;;;CustomerReview;+;+;+;;;
 ;;;;ClassificationAttribute;+;+;+;;;
 ;;;;ClassificationAttributeUnit;+;+;+;;;
 ;;;;ClassificationSystem;+;+;+;;;
 ;;;;ClassificationSystemVersion;+;+;+;;;
 ;;;;ClassificationAttributeValue;+;+;+;;;
 ;;;;Currency;+;;;;;
 ;;;;VariantType;+;;;;;
 ;;;;Comment;+;;;;;
 ;;;;Vendor;+;;;;;
 ;;;;ProductOrderLimit;+;;;;;
 ;;;;SolrHeroProductDefinition;+;;;;;
 ;;;;ZoneDeliveryMode;+;;;;;
 ;;;;CMSLinkComponent;+;;;;;
 ;;;;ProductFeatureComponent;+;;;;;
 ;;;;ProductListComponent;+;;;;;
 ;;;;CMSProductRestriction;+;;;;;
 ;;;;ItemSyncTimestamp;+;;;;;
 ;;;;WorkflowActionStatus;+;;;;;
 ;;;;Workflow;+;;;;;
 ;;;;WorkflowActionType;+;;;;;
 ;;;;WorkflowActionTemplate;+;;;;;
 ;;;;JasperMedia;+;+;+;;;
 ;;;;UserGroup;+;;;;;
 ;;;;CategoryFeatureComponent;+;;;;;
 ;;;;ProductCatalogNavComponent;+;;;;;
 ;;;;ProductCarouselComponent;+;;;;;
 ;;;;CMSCategoryRestriction;+;;;;;
 ;;;;StockLevel;+;;;;;
 ;;;;Warehouse;+;;;;;
 ;;;;Tax;+;;;;;
 ;;;;ProductDetailComponent;+;;;;;
 ;;;;ProductEAN;+;;;;;
 ;;;;CockpitItemTemplate;+;;;;;
 ;;;;Language;+;;;;;
 ;;;;CounterPayPaymentModeValue;+;;;;;
 
 $END_USERRIGHTS;;;;;

And for the backoffice tree view changes you need to add the similar xml config to your custom- backoffice-config.xml in your backoffice extension

  <!-- Explorer tree for product admin and manager role (uid productmanagerrole, productadminrole)-->
     <context component="explorer-tree" merge-by="principal" principal="productmanagerrole,productadminrole">
         <explorer-tree:explorer-tree  xmlns:explorer-tree="http://www.hybris.com/cockpitng/config/explorertree" >
             <explorer-tree:navigation-node id="hmc_treenode_system" merge-mode="REMOVE"/>
             <explorer-tree:navigation-node id="hmc_treenode_catalog">
                 <explorer-tree:type-node code="Catalog" id="hmc_typenode_catalog" merge-mode="REMOVE"/>                
                 <explorer-tree:type-node code="CatalogVersion" id="hmc_typenode_catalogversion" merge-mode="REMOVE"/>
                 <explorer-tree:type-node code="VariantType" id="hmc_typenode_varianttype" merge-mode="REMOVE"/>
                 <explorer-tree:type-node code="Unit" id="hmc_typenode_unit" merge-mode="REMOVE"/>
             </explorer-tree:navigation-node>
             <explorer-tree:navigation-node id="hmc_treenode_user" merge-mode="REMOVE"/>
             <explorer-tree:navigation-node id="hmc_treenode_order" merge-mode="REMOVE"/>
             <explorer-tree:navigation-node id="hmc_treenode_pricesettings" merge-mode="REMOVE"/>
             <explorer-tree:navigation-node id="hmc_treenode_c2l" merge-mode="REMOVE"/>
             <explorer-tree:navigation-node id="hmc_treenode_marketing">
                 <explorer-tree:navigation-node id="hmc_treenode_orderstatistics" merge-mode="REMOVE"/>
                 <explorer-tree:navigation-node id="hmc_typenode_promotion_rules" merge-mode="REMOVE"/>
                 <explorer-tree:type-node id="hmc_typenode_promotion_rule_templates" code="PromotionSourceRuleTemplate" merge-mode="REMOVE"/>
                 <explorer-tree:type-node id="hmc_type_tree_promotiongroup" code="PromotionGroup" merge-mode="REMOVE"/>
                 <explorer-tree:type-node id="hmc_typenode_promotion_modules" code="DroolsKIEModule" merge-mode="REMOVE"/>
                 <explorer-tree:navigation-node id="hmc_treenode_coupon_management" merge-mode="REMOVE"/>
                 <explorer-tree:type-node id="hmc_type_tree_voucher" merge-mode="REMOVE"/>
             </explorer-tree:navigation-node>
             <explorer-tree:navigation-node id="hmc.cms2" merge-mode="REMOVE"/>
             <explorer-tree:navigation-node id="hmc.cockpit" merge-mode="REMOVE"/>
             <explorer-tree:navigation-node id="ruleengine" merge-mode="REMOVE"/>
             <explorer-tree:navigation-node id="hmc_ticketsystemgroup" merge-mode="REMOVE"/>
              <explorer-tree:navigation-node id="hmc.group.basecommerce" merge-mode="REMOVE"/>
              <explorer-tree:navigation-node id="hmc.group.basecommerce.deeplink" merge-mode="REMOVE"/>
              <explorer-tree:navigation-node id="cxnode" merge-mode="REMOVE"/>
         </explorer-tree:explorer-tree>
     </context>