I have Lightning Quickactions for Delete and Clone on a CustomObject__c
and I want to ensure that only users with the right permission can use it.
From reading this documentation I understand that I have to check CRUD permissions before doing DML with isDeletable
and isCreatable
.
But what about sharing? My Controllers use with sharing
as recommended but what if my user has ReadOnly Sharing.
- Will he be able to delete or clone or do I need to add complicated tests of Sharing tables?
- How do Standard Clone and Delete buttons on Lightning Record pages behave?
- Will they allow a user with CRUD permission by only ReadOnly Sharing see them and what will happen on click?