<?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>LIFERAY JAVASCRIPT APIS</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=112098736" />
  <subtitle>LIFERAY JAVASCRIPT APIS</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=112098736</id>
  <updated>2026-04-04T09:34:51Z</updated>
  <dc:date>2026-04-04T09:34:51Z</dc:date>
  <entry>
    <title>RE: LIFERAY JAVASCRIPT APIS</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112113501" />
    <author>
      <name>Arun Das</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112113501</id>
    <updated>2019-01-24T01:49:18Z</updated>
    <published>2019-01-24T01:49:18Z</published>
    <summary type="html">&lt;blockquote&gt;
  &lt;div class="quote-title"&gt;David H Nebinger:&lt;/div&gt;
  &lt;div class="quote"&gt;
    &lt;div class="quote-content"&gt;
      &lt;p&gt;getUserId() does not invoke the back end. It is a
        javascript-only object that has been populated during page
        rendering. If that's the only method you're concerned about
        &amp;quot;hiding&amp;quot;, there is no reason to pursue it because it
        is not able&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;No, thats was just an example.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;blockquote&gt;
  &lt;div class="quote-title"&gt;Discoverability just hides it from the
    /api/jsonws listing, but it does not make the method protected or
    anything. Knowing what I know about Liferay, I can invoke services
    against your instance whether /api/jsonws is working or not.&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;Yes, that was the basic idea for this too, just hide.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Thanks and anyways, the answer is no then.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Arun&lt;br /&gt;  &lt;/p&gt;</summary>
    <dc:creator>Arun Das</dc:creator>
    <dc:date>2019-01-24T01:49:18Z</dc:date>
  </entry>
  <entry>
    <title>RE: LIFERAY JAVASCRIPT APIS</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112110637" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112110637</id>
    <updated>2019-01-23T18:20:33Z</updated>
    <published>2019-01-23T18:20:33Z</published>
    <summary type="html">&lt;p&gt;getUserId() does not invoke the back end. It is a javascript-only
  object that has been populated during page rendering. If that's the
  only method you're concerned about &amp;quot;hiding&amp;quot;, there is no
  reason to pursue it because it is not able to be hidden.&lt;/p&gt;
&lt;p&gt;Discoverability just hides it from the /api/jsonws listing, but it
  does not make the method protected or anything. Knowing what I know
  about Liferay, I can invoke services against your instance whether
  /api/jsonws is working or not.&lt;/p&gt;</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-01-23T18:20:33Z</dc:date>
  </entry>
  <entry>
    <title>RE: LIFERAY JAVASCRIPT APIS</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112109341" />
    <author>
      <name>Arun Das</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112109341</id>
    <updated>2019-01-23T17:52:27Z</updated>
    <published>2019-01-23T17:52:27Z</published>
    <summary type="html">&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;I was debugging something else and found this by accident and I’m not
  planning to change anything from that JavaScript. I was just wondering
  if there is any way to hide it from global access. Something like, you
  can make json web services discoverable on api page using a property &lt;/p&gt;
&lt;p&gt;jsonws.web.service.api.discoverable=true&lt;/p&gt;
&lt;p&gt;and set this to false to hide it from api page. &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Arun&lt;/p&gt;</summary>
    <dc:creator>Arun Das</dc:creator>
    <dc:date>2019-01-23T17:52:27Z</dc:date>
  </entry>
  <entry>
    <title>RE: LIFERAY JAVASCRIPT APIS</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112105140" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112105140</id>
    <updated>2019-01-23T14:07:15Z</updated>
    <published>2019-01-23T14:07:15Z</published>
    <summary type="html">&lt;p&gt;You should not change the Liferay javascript unless you really,
  really, really know what you're doing.&lt;/p&gt;
&lt;p&gt;And if you really, really, really think you know what you are doing,
  scrap that thought and go back to not changing the Liferay javascript.&lt;/p&gt;</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2019-01-23T14:07:15Z</dc:date>
  </entry>
  <entry>
    <title>LIFERAY JAVASCRIPT APIS</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112098735" />
    <author>
      <name>Arun Das</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=112098735</id>
    <updated>2019-01-23T09:42:40Z</updated>
    <published>2019-01-23T09:42:40Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;From Google chrome console, you can access Liferay JavaScript object
  (screenshots below)&lt;/p&gt;
&lt;p&gt;
  &lt;img src="/documents/14/110203810/_that.PNG/620599a2-0875-dcbe-66fb-c0a06666424c?t=1548236194084"&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;
  &lt;img src="/documents/14/110203810/_this.PNG/080c21d0-7e83-21b7-9399-626eb0334a41?t=1548236209638"&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;From &lt;a href="https://dev.liferay.com/develop/tutorials/-/knowledge_base/7-1/liferay-javascript-apis"&gt;here
  &lt;/a&gt;it says, "The&amp;nbsp;&lt;code&gt;Liferay&lt;/code&gt;&amp;nbsp;JavaScript object exposes
  methods, objects, and properties that you can use to access Liferay
  Portal-specific information"&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I was wondering, if we could disable it or change it from public
  access. If yes, how to disable this and if we disable it, will it
  break any functionality?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope someone could shed some light.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Arun&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Arun Das</dc:creator>
    <dc:date>2019-01-23T09:42:40Z</dc:date>
  </entry>
</feed>
