+ Start a Discussion
EEEEEE 

Permission Denied in Firefox when setting logged in user in scontrol

We have an scontrol that is overriding the NEW button on LEAD that forces the user to search before having the ability to creating a lead. In the scontrol the search logs in as a search user with rights to see all records for duplicate detection using....
 
var result = sforce.Client.login("searchuser", "searchuserpassword”);

This process works in IE when I enable the ACCESS DATA SOURCES ACROSS DOMAINS option in Internet Options + Security + Custom Level + Miscellaneous. However this does not work in Firefox and I need it to.

I saw this thread about the same sort of subject but no solution:
http://community.salesforce.com/sforce/board/message?board.id=ajax_toolkit&message.id=619&query.id=9179#M619

I have added salesforce.com as a trusted site everywhere I could find in Firefox options and that didn’t help…

I added logic to grant universal browser read, but that didn’t help....

Digging further with Firebug I’m seeing the error is on:

uncaught exception: Permission denied to call method XMLHttpRequest.open
XmlHttp(function(), "<?xml version='1.0' encoding='UTF-8' ?><soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/s...", false, function())sforceclient.js (line 833)
SendRequest("<?xml version='1.0' encoding='UTF-8' ?><soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/s...", function(), "login", false, "https://www.salesforce.com/services/Soap/u/7.0?nocache=1175710190078")sforceclient.js (line 895)
login("searchuser@ourdomain.com", "searchpassword", undefined)sforceclient.js (line 968)

I tried defining the callback with success / failure, which it now sees the undefined as an object, but I can’t get around that PERMISSION DENIED on the XMLHttpRequest. I have been looking at how to make the XMLHttpRequest, but I feel like I’m going in circles.

Thoughts or suggestions on how I can get this working in Firefox….?
 
Thanks-
Edmund

EEEEEE
I tried adding the user_prefs noted in this link to the pref.js and that didn't help.

http://community.salesforce.com/sforce/board/message?board.id=sforceExplorer&message.id=234#M234

Anybody changing users inside an scontrol to do something, violating premissions potentially, and able to do it using Firefox please shed some light and code on how your doing it...........
BLBL
Any Mozilla based browser (Firefox, Camino, etc.) will return this error when you try to execute XMLHttpRequests from one domain to another (http://yoursite.com to www.salesforce.com/services/Soap/u/11.0 for example).

To get around this you need to disable cross site scripting protection within hidden preferences in Firefox or other Mozilla based browsers and add a line of code to your javascript library:

netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");

I've posted details on how to fix Permission denied to call method XMLHttpRequest.open with respect to the Ajax Toolkit on my blog. The solution should be workable for your situation as well.

Although, this is only a fix during development as asking your users to do this to their Firefox browser is not an option.

Anyways, hope it sheds some light on the situation.