In Assest table we have give write access to model & model category fields

anataraj
Tera Contributor

In Asset table we have give access for one particular user edit the model & model category fields which is in read only after form submission or saved, except that particular user for everyone this two model & model category should be read only after form submission. Please anyone can help on this to achieve the task with ACL Script

Thanks,
Nataraj Angadi

2 REPLIES 2

Dibyaratnam
Tera Sage

@anataraj It's not the best practice to set ACL for a specific user rather than for a group. But considering your requirement, check the advanced box and in script section add below piece of code.

if (gs.getUserName()=='userIdOfUser')
    answer = true;
else{answer = false;}

 After that check for any other ACLs present on alm_asset table that might restrict writing on fields so make the changes accordingly.

piyushsain
Tera Guru
Tera Guru

Hi, 

In the Table search for table level write ACL and in those add script:

if(gs.getUserName() == 'UserId of the User')
return true;

else
return false;
 
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,
Piyush Sain