on ‎2018 Dec 01 11:24 AM
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
Request clarification before answering.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
thanks a lot. Appreciate it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
still didn't work for me. By the way I'm using v1808 and b2b_acc_plus.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No problem. Please do the following:
Login to backoffice using admin/nimda and press F4 to enter the Application Orchestrator mode
Click the hybris icon on the right top corner and select Show cockpit-config.xml
Add my code at the end (just before </config> ) of the cockpit-config.xml. Click STORE and then CLOSE.
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).
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 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.