Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when user doesn't have enough access #8

Open
pgonzaleznetwork opened this issue Apr 15, 2021 · 0 comments
Open

Error when user doesn't have enough access #8

pgonzaleznetwork opened this issue Apr 15, 2021 · 0 comments

Comments

@pgonzaleznetwork
Copy link
Owner

pgonzaleznetwork commented Apr 15, 2021

the listMetdata() call fails when the user is not an admin. Need to do some research to see what the user sees in the UI when this is thrown. Potentially we need to catch the error and modify it to return a more user friendly message i.e

You must have a system admin profile in order to use HappySoup.io. You are missing the ModifyAllData or ModifyMetadata permissions

{
  "fetchOptions": {
    "method": "POST",
    "headers": {
      "Content-Type": "text/xml;charset=UTF-8",
      "SOAPAction": "c",
      "Accept-Encoding": "gzip,deflate"
    },
    "body": "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:met=\"http://soap.sforce.com/2006/04/metadata\">\n <soapenv:Header>\n n </soapenv:Header>\n <soapenv:Body>\n <met:listMetadata>\n <met:queries>\n <met:type>CustomObject</met:type>\n </met:queries>\n <met:asOfVersion>48.0</met:asOfVersion>\n </met:listMetadata>\n </soapenv:Body>\n </soapenv:Envelope>"
  },
  "json": {
    "soapenv:Envelope": {
      "soapenv:Body": {
        "soapenv:Fault": {
          "faultcode": "sf:INSUFFICIENT_ACCESS",
          "faultstring": "INSUFFICIENT_ACCESS: use of the Metadata API requires a user with the ModifyAllData or ModifyMetadata permissions"
        }
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant