<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Denied access to model object as it does not belong to current company</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121983450" />
  <subtitle>Denied access to model object as it does not belong to current company</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121983450</id>
  <updated>2026-04-06T19:33:08Z</updated>
  <dc:date>2026-04-06T19:33:08Z</dc:date>
  <entry>
    <title>Denied access to model object as it does not belong to current company</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121983449" />
    <author>
      <name>Mohamed Saleem</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121983449</id>
    <updated>2023-08-18T04:51:12Z</updated>
    <published>2023-08-17T08:18:40Z</published>
    <summary type="html">&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am getting &amp;quot;Denied access to model object as it does not
  belong to current company 282093&amp;quot; Error while i am rendering
  freemarker template .&lt;/p&gt;
&lt;p&gt;In 7.4 liferay restricting other company objects&lt;/p&gt;
&lt;p&gt;But in my case I trying to fetch basic document fileentry type only .&lt;/p&gt;
&lt;p&gt;below is my code&lt;/p&gt;
&lt;p&gt;&amp;lt;#assign DLFileEntryTypeService = serviceLocator.findService(&amp;quot;com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService&amp;quot;)&amp;gt;&lt;/p&gt;
&lt;p&gt;${DLFileEntryTypeService.fetchDLFileEntryType(0)}&lt;/p&gt;
&lt;p&gt;Same api is working in groovy but not working in freemarker&lt;/p&gt;
&lt;p&gt;How can I get objects with companyId 0 (Liferay  default created objects)&lt;/p&gt;
&lt;p&gt;How Can I resolve this?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Saleem.&lt;/p&gt;</summary>
    <dc:creator>Mohamed Saleem</dc:creator>
    <dc:date>2023-08-17T08:18:40Z</dc:date>
  </entry>
</feed>
