Skip to Content
author's profile photo Former Member
Former Member

Disabling Attributes Dynamically in BackOffice for certain User Groups

Hi, I want to disable two attributes present in different section in editor area for a certain user group. So far, I am using the following code. But not able to succeed. Both field books_access and comment have all the access rights i.e (read,write etc).

Code Snippet:

  <context type="Books" component="editorAreaDynamicForms" merge-by="module" principal="books_access">
     <df:dynamicForms xmlns:df="http://www.hybris.com/cockpitng/component/dynamicForms">
     <attribute id="a" qualifier="bookStatus" disabledIf="true" triggeredOn="*"/>
     <attribute id="b" qualifier="comment" disabledIf="true" triggeredOn="*"/>
 </df:dynamicForms>
 </context>

 <context component="editor-area" type="Books" principal="books_access">
 <ea:editorArea xmlns:ea="http://www.hybris.com/cockpitng/component/editorArea" name="BooksEditor">
         <ea:tab name="Basic">
             <ea:section name="Essentials1" columns="2">
                 <ea:attribute qualifier="bookName"/>
                 <ea:attribute qualifier="bookSubject"/>
                 <ea:attribute qualifier="Author"/>
                 <ea:attribute qualifier="bookStatus"/>
             </ea:section>
             <ea:section name="Essentials2" columns="2">
                 <ea:attribute qualifier="isGood"/>
                 <ea:attribute qualifier="comment"/>
             </ea:section>
         </ea:tab>
      </ea:editorArea>
 </context>

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Aug 22, 2016 at 10:20 AM

    Hi,

    You can achieve this by merging context (attribute principal=""). More details you can find here: https://help.hybris.com/6.1.0/hcd/8b929ff186691014b99cb77661a3ed52.html

    Section CockpitConfigurationContextStrategy

    Important thing: within principal attribute you have to specify 'authority group'

    Regards,

    Ɓukasz

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.