How to enable and disable the edit icon for an item within a gallery based on permissions on the item. I have a flow that runs and changes the permission of created to read only once the item is submitted

How to enable and disable the edit icon for an item within a gallery based on permissions on the item. I have a flow that runs and changes the permission of created to read only once the item is submitted
Hi @Shanu ,
I created an example here. This grid has several users. Two have an "Admin" role and the others have "readonly" roles.
In the DisplayMode property of the edit icon, i did this:
The code is:
If(ThisItem.role = "admin", DisplayMode.Edit, DisplayMode.Disabled)
Hope this helps get you on the right track!