<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarcrm.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Exception Caught: You are not authorized to create Invoices/Quotes</title><link>https://sugarclub.sugarcrm.com/dev-club/f/questions-answers/5628/exception-caught-you-are-not-authorized-to-create-invoices-quotes</link><description>Hi After upgraded Sugarcrm from v10.0.4 to v11.0.0 We found that one of the api function throwing an exception and the message were { &amp;quot;status&amp;quot;: &amp;quot;fail&amp;quot;, &amp;quot;message&amp;quot;: &amp;quot;Exception Caught: You are not authorized to create Invoices/Quotes. Contact your administrator</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Exception Caught: You are not authorized to create Invoices/Quotes</title><link>https://sugarclub.sugarcrm.com/thread/26494?ContentTypeID=1</link><pubDate>Mon, 16 May 2022 18:36:32 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:d4b7a6ab-3e9b-4f05-adf5-2b811f4540ae</guid><dc:creator>Jeff Bickart</dc:creator><description>&lt;p&gt;&lt;a href="/members/manson"&gt;Manson ho&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In a future&amp;nbsp;post&amp;nbsp;at &lt;a href="https://sugardevelopersguide.substack.com/" rel="noopener noreferrer" target="_blank"&gt;sugardevelopersguide.substack.com&lt;/a&gt;,&amp;nbsp;I will provide step-by-step instructions on using PHPStrorm to debug your Sugar instance.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll provide examples via Postman, the browser, and CLI.&lt;/p&gt;
&lt;p&gt;If you don&amp;#39;t subscribe; please do so so you are notified when there are new posts&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Exception Caught: You are not authorized to create Invoices/Quotes</title><link>https://sugarclub.sugarcrm.com/thread/26476?ContentTypeID=1</link><pubDate>Wed, 11 May 2022 22:37:33 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:562926bc-cb6b-4c2a-aaf8-cc7fc45c683a</guid><dc:creator>Manson ho</dc:creator><description>&lt;p&gt;Hi Jeff,&lt;br /&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;After spending two days for debugging, I am confusing about the user role thing.&lt;br /&gt;The exception is throwing by this file /SugarPro/clients/base/api/ModuleApi.php and the method is createBean&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="php"&gt;        if (!$bean-&amp;gt;ACLAccess(&amp;#39;save&amp;#39;, $this-&amp;gt;aclCheckOptions)) {
            // No create access so we construct an error message and throw the exception
            $moduleName = null;
            if(isset($args[&amp;#39;module&amp;#39;])){
                $failed_module_strings = return_module_language($GLOBALS[&amp;#39;current_language&amp;#39;], $args[&amp;#39;module&amp;#39;]);
                $moduleName = $failed_module_strings[&amp;#39;LBL_MODULE_NAME&amp;#39;];
            }
            $args = null;
            if(!empty($moduleName)){
                $args = array(&amp;#39;moduleName&amp;#39; =&amp;gt; $moduleName);
            }
            throw new SugarApiExceptionNotAuthorized(&amp;#39;EXCEPTION_CREATE_MODULE_NOT_AUTHORIZED&amp;#39;, $args);
        }&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;In order to use postman for testing, I disable the required login. Then, I try to call our custom api which will turn out creating a new non paid invoice.&lt;br /&gt;&lt;br /&gt;The questions is, if no login require, then how come sugar will check the ACLAccess?&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Which account sugar is using to check the role and permission?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Exception Caught: You are not authorized to create Invoices/Quotes</title><link>https://sugarclub.sugarcrm.com/thread/26471?ContentTypeID=1</link><pubDate>Wed, 11 May 2022 01:16:01 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:53f017e4-9adc-46cc-bb90-05d4f17f0d33</guid><dc:creator>Jeff Bickart</dc:creator><description>&lt;p&gt;Please review the User account. What license are they assigned? Are they a member of any role? You can see this on the Users profile on the Access Tab. Does the user have the ability to Save the Invoices/Quotes?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>