Shatanik13 / force-dot-com-esapi

Automatically exported from code.google.com/p/force-dot-com-esapi
0 stars 0 forks source link

Suggest to include methods that check record level access #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Enhancement:

It would be useful if the ESAPI would provide methods for checking the record 
level access (sharing rules). So these are methods that check whether the 
current user has access to a given record (e.g. passed by the ID or passed as 
an sObject).

Original issue reported on code.google.com by sascha.k...@gmail.com on 11 Feb 2013 at 4:27

GoogleCodeExporter commented 8 years ago

Original comment by apex.es...@gmail.com on 11 Feb 2013 at 7:23

GoogleCodeExporter commented 8 years ago
Could use this kind of query to find out whether the current user has access to 
the record with a particular ID:

SELECT RecordId FROM UserRecordAccess WHERE UserId=:UserInfo.getUserId() AND 
HasReadAccess = true AND RecordId = :recordId

Does this count against the governor limit? If so, we would need a bulk method 
that takes a set of IDs rather than one single Id. It would also a (sub-)set of 
IDs toi which a user has access to.

Original comment by sascha.k...@gmail.com on 12 Feb 2013 at 4:17