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

How to set features as readonly?

mohammed24
Participant
0 Likes
1,222

Hi experts,

How to set feature attributes as readonly in backoffice based on type of attribute?

is there any service through which we can set this as readonly?

Note : i need this through java and not impex

Accepted Solutions (0)

Answers (2)

Answers (2)

arvind-kumar_avinash
Active Contributor
0 Likes

By importing the following ImpEx, you can set Product.approvalStatus as readonly for boprodmgr

 $passwordEncoding=md5
 $defaultPassword=1234
 $setPassword=@encodedPassword[translator=de.hybris.platform.impex.jalo.translators.ConvertPlaintextToEncodedUserPasswordTranslator][default='$passwordEncoding:$defaultPassword']
 
 INSERT_UPDATE UserGroup;UID[unique=true];groups(uid)[mode=append]
 ;boproductmanagergroup;backofficeproductmanagergroup
 
 INSERT_UPDATE Employee;UID[unique=true]
 ;boprodmgr
 
 UPDATE Employee;UID[unique=true];$setPassword;groups(uid);sessionLanguage(isocode);sessionCurrency(isocode)
 ;boprodmgr;;boproductmanagergroup;en;EUR
 
 $START_USERRIGHTS
 Type;UID;MemberOfGroups;Password;Target;read;change;create;delete;change_perm
 UserGroup;boproductmanagergroup
 ;;;;Product.approvalStatus;;-;;;
 $END_USERRIGHTS
Former Member
0 Likes

Hi Arvind,

How can I make an attribute non-editable through impex. I have an attribute at Category type and I do not want it to be edited through impex as well. I used validateinterceptor but it did not work though i kept impex.legacy.mode as false. Please help.

Former Member
0 Likes

Hi ,

My suggestions will not be through java, but you may find these also helpful.

Firstly, we can set the attribute modifier as readonly="true" in *backoffice-config.xml to make our attributes not editable in backoffice.

Secondly, we can use the Access Rights for a usergroup to specify that it has only read access to the attribute. This change will work for all tools. More information https://wiki.hybris.com/display/release5/Access+Rights

I hope these will be a solution for you.

Best Regards,