cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Unable to remove tab for backofficeproductmanager principle

0 Likes
1,142

Hi All,

I am trying to remove or rename existing tabs in backoffice product cockpit for principle group backofficeproductmanager. Below is the code snippet that I am trying:

         <editorArea:tab name="hmc.tab.attribute" merge-mode="remove"/>
         <editorArea:tab name="hmc.tab.product.variants" merge-mode="remove"/>

In extensioninfo.xml, I have below code:

Somehow this piece of code is not working. Can anyone tell me what's wrong with this?

Thanks Jwala

Accepted Solutions (1)

Accepted Solutions (1)

0 Likes

Hi thanks a lot for your time and valuable inputs.

I tried above steps, but these tabs were removed for admin user. I mean, when I logged in with admin user, I don't see these tabs at all. But if I login with the user who is having backofficeproductmanager group assigned, able to see these tabs.

My expectation is, these tabs should not be visible for admin/user who is having backofficeproductmanager group. Or, these tabs names should be changed to custom name.

Kindly suggest.

arvind-kumar_avinash
Active Contributor
0 Likes

The code in my answer still works as expected (i.e. the tabs will not be visible to BackofficeProductManager) in both v6.7 and v1808. However, if you change the principal to backofficeproductmanagergroup, it works as expected in v6.7 but not in v1808. I have created a new question ( https://answers.sap.com/questions/12770559/merge-by-principal-does-not-work-for-usergroup-bug.html ) and requested the moderators to log a bug.

arvind-kumar_avinash
Active Contributor
0 Likes

You have accepted your own answer instead of mine 🙂 . Is it intentionally or by mistake?

0 Likes

By mistake.

arvind-kumar_avinash
Active Contributor
0 Likes

In that case, you can still Unaccept your answer and Accept mine 🙂

Answers (4)

Answers (4)

0 Likes

thanks a lot. Appreciate it.

0 Likes

still didn't work for me. By the way I'm using v1808 and b2b_acc_plus.

arvind-kumar_avinash
Active Contributor
0 Likes

No problem. Please do the following:

  1. Login to backoffice using admin/nimda and press F4 to enter the Application Orchestrator mode

  2. Click the hybris icon on the right top corner and select Show cockpit-config.xml

  3. Add my code at the end (just before </config> ) of the cockpit-config.xml. Click STORE and then CLOSE.

  4. Press F4 again, logout and login using BackofficeProductManager/1234

If it works for you, I will suggest you what you need to do next. I am waiting for your feedback.

Please note that I have already tested my code with two versions (6.7 and v1808).

0 Likes

Hi ,

Thanks for your inputs.

I have added the code that you suggested. Still I am able to see the tabs. Please refer code below.

mybackoffice-backoffice-config.xml

 <context principal="backofficeproductmanagergroup,backofficeproductadministratorgroup" merge-by="principal" 
          parent="GenericItem" 
          type="Product" 
          component="editor-area" 
          module="mybackoffice">
      <editorArea:editorArea xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea" name="">
          <editorArea:tab merge-mode="REMOVE" name="hmc.tab.attribute"/>
          <editorArea:tab merge-mode="REMOVE" name="hmc.tab.product.variants"/>
      </editorArea:editorArea>
  </context>

extensioninfo.xml

 <extension abstractclassprefix="Generated" classprefix="Mybackoffice" name="mybackoffice" usemaven="false">
     <requires-extension name="backoffice"/>
     <!-- <requires-extension name="platformbackoffice"/> -->
     <coremodule generated="true" manager="my.backoffice.jalo.MybackofficeManager" packageroot="my.backoffice"/>
     <meta key="backoffice-module" value="true"/>        
 </extension>

Please let me know in case any corrections required.

arvind-kumar_avinash
Active Contributor
0 Likes

Yes. You need to put module="platformbackoffice" as I have done in my code. Please note that there is a bug in v1808. The code in my answer still works as expected (i.e. the tabs will not be visible to BackofficeProductManager) in both v6.7 and v1808. However, if you change the principal to backofficeproductmanagergroup, it works as expected in v6.7 but not in v1808. I have created a new question ( https://answers.sap.com/questions/12770559/merge-by-principal-does-not-work-for-usergroup-bug.html ) and requested the moderators to log a bug.

arvind-kumar_avinash
Active Contributor
0 Likes

Please note that you do not need to make any change in extensioninfo.xml for this requirement. Please let me know if you face any problem further.

arvind-kumar_avinash
Active Contributor
0 Likes

Without full context information, it will be difficult to analyze the problem. Please put the following in yourcustomboextension/resources/yourcustomboextension-backoffice-config.xml:

 <context principal="BackofficeProductManager" merge-by="principal" parent="GenericItem" type="Product" component="editor-area" module="platformbackoffice">
     <editorArea:editorArea xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea" name="">
         <editorArea:tab merge-mode="REMOVE" name="hmc.tab.attribute"/>
         <editorArea:tab merge-mode="REMOVE" name="hmc.tab.product.variants"/>
     </editorArea:editorArea>
 </context>

Note: please make sure that yourcustomboextension is included in localextensions.xml.

In order to debug the problem, it is important that you open the backoffice in Application Orchestrator mode (press F4 keyboard button while you are logged as an admin user) and check if the above configuration has been loaded in cockpit-config.xml or not.

arvind-kumar_avinash
Active Contributor
0 Likes

Please note that there is a bug in v1808. The code in my answer still works as expected (i.e. the tabs will not be visible to BackofficeProductManager) in both v6.7 and v1808. However, if you change the principal to backofficeproductmanagergroup, it works as expected in v6.7 but not in v1808. I have created a new question ( https://answers.sap.com/questions/12770559/merge-by-principal-does-not-work-for-usergroup-bug.html ) and requested the moderators to log a bug.