I'm trying to get all the cors whitelist right when my applications starts uploading and i have no trobule doing so as an admin. The problems appears when i log in a standard user. I'm getting an error in my console saying "sObject type is not supported". Is there a way i can fix this?
This is my where i'm getting the list from
@AuraEnabled @RemoteAction
public static List getWhitelist() {
try {
List whiteList = [SELECT Id, UrlPattern FROM CorsWhiteListEntry];
updateLastTimeUserEnter();
return whiteList;
} catch (Exception e) {
throw e;
}
}