<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: collaboration-title.get.js accessing people object in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230160#M183290</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;STRONG&gt;header.get.html.ftl&lt;/STRONG&gt; in Share: &lt;STRONG&gt;user.isAdmin&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Mike&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply Mike.&amp;nbsp; Per original request I am looking for where this is used in the JS file.&amp;nbsp; I need to make the system feel that anyone who is an adminstrator is also a site manager for a site so they can manage users when needed, or when the sync job blows an admin away without checking that there is at least one admin left on the site before doing so.&amp;nbsp; I am trying to do it in this block of code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;// if (json.status == 200 || people.isAdmin(person) == true)&lt;BR /&gt;if (json.status == 200)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var obj = eval('(' + json + ')');&lt;BR /&gt;&amp;nbsp;&amp;nbsp; userIsMember = true;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; userIsSiteManager = obj.role == "SiteManager";&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; // Stse the memberships into the request context, it is used&lt;BR /&gt;&amp;nbsp;&amp;nbsp; // downstream by other components - saves making same call many times&lt;BR /&gt;&amp;nbsp;&amp;nbsp; context.setValue("memberships", obj);&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The commented out line above is what I'm trying to make work.&amp;nbsp; Any thoughts?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;JR&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Sep 2009 12:47:26 GMT</pubDate>
    <dc:creator>jriker1</dc:creator>
    <dc:date>2009-09-25T12:47:26Z</dc:date>
    <item>
      <title>collaboration-title.get.js accessing people object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230156#M183286</link>
      <description>I want to check if an individual is an admin in a js file.&amp;nbsp; I have seen a reference to people.isAdmin(person) == true however I get a  08210000 ReferenceError: "people" is not defined. (file:/srv/tomcat6/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/title/collaborati</description>
      <pubDate>Mon, 21 Sep 2009 18:59:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230156#M183286</guid>
      <dc:creator>jriker1</dc:creator>
      <dc:date>2009-09-21T18:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: collaboration-title.get.js accessing people object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230157#M183287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Your problem is that your script is in the "share" webapp.&amp;nbsp;&amp;nbsp; And that does not have access to the local alfresco Java Script objects such as people.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One way of solving this is to use a webscript that pulls data from the repo, where it can run your java script.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2009 22:02:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230157#M183287</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2009-09-21T22:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: collaboration-title.get.js accessing people object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230158#M183288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Your problem is that your script is in the "share" webapp.&amp;nbsp;&amp;nbsp; And that does not have access to the local alfresco Java Script objects such as people.&lt;BR /&gt;&lt;BR /&gt;One way of solving this is to use a webscript that pulls data from the repo, where it can run your java script.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply.&amp;nbsp; As you can imagine my next inquiry.&amp;nbsp; Since I am still learning the framework do you have an example in my situation on how to accomplish this?&amp;nbsp; Or perhaps an example where this is used actively in the current code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;JR&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Sep 2009 22:25:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230158#M183288</guid>
      <dc:creator>jriker1</dc:creator>
      <dc:date>2009-09-21T22:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: collaboration-title.get.js accessing people object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230159#M183289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;header.get.html.ftl&lt;/STRONG&gt;&lt;SPAN&gt; in Share: &lt;/SPAN&gt;&lt;STRONG&gt;user.isAdmin&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 08:08:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230159#M183289</guid>
      <dc:creator>mikeh</dc:creator>
      <dc:date>2009-09-23T08:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: collaboration-title.get.js accessing people object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230160#M183290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;STRONG&gt;header.get.html.ftl&lt;/STRONG&gt; in Share: &lt;STRONG&gt;user.isAdmin&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Mike&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply Mike.&amp;nbsp; Per original request I am looking for where this is used in the JS file.&amp;nbsp; I need to make the system feel that anyone who is an adminstrator is also a site manager for a site so they can manage users when needed, or when the sync job blows an admin away without checking that there is at least one admin left on the site before doing so.&amp;nbsp; I am trying to do it in this block of code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;// if (json.status == 200 || people.isAdmin(person) == true)&lt;BR /&gt;if (json.status == 200)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; var obj = eval('(' + json + ')');&lt;BR /&gt;&amp;nbsp;&amp;nbsp; userIsMember = true;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; userIsSiteManager = obj.role == "SiteManager";&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; // Stse the memberships into the request context, it is used&lt;BR /&gt;&amp;nbsp;&amp;nbsp; // downstream by other components - saves making same call many times&lt;BR /&gt;&amp;nbsp;&amp;nbsp; context.setValue("memberships", obj);&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The commented out line above is what I'm trying to make work.&amp;nbsp; Any thoughts?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;JR&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 12:47:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230160#M183290</guid>
      <dc:creator>jriker1</dc:creator>
      <dc:date>2009-09-25T12:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: collaboration-title.get.js accessing people object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230161#M183291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;STRONG&gt;header.get.html.ftl&lt;/STRONG&gt; in Share: &lt;STRONG&gt;user.isAdmin&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Mike&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;The commented out line above is what I'm trying to make work.&amp;nbsp; Any thoughts?&lt;BR /&gt;&lt;BR /&gt;JR&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you try &lt;/SPAN&gt;&lt;STRONG&gt;user.isAdmin&lt;/STRONG&gt;&lt;SPAN&gt;..?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 13:17:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230161#M183291</guid>
      <dc:creator>mikeh</dc:creator>
      <dc:date>2009-09-25T13:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: collaboration-title.get.js accessing people object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230162#M183292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Did you try &lt;STRONG&gt;user.isAdmin&lt;/STRONG&gt;..?&lt;BR /&gt;&lt;BR /&gt;Mike&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Didn't expect this would work, got:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;08250000 TypeError: isAdmin is not a function, it is java.lang.Boolean. (file:/srv/tomcat6/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/title/collaboration-title.get.js#29)&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Remember I am trying to find out if a user is an admin in the collaboration-title.get.js file.&amp;nbsp; Not in one of the ftl files.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;JR&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 21:35:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230162#M183292</guid>
      <dc:creator>jriker1</dc:creator>
      <dc:date>2009-09-25T21:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: collaboration-title.get.js accessing people object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230163#M183293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The error describes the problem: you're trying &lt;/SPAN&gt;&lt;STRONG&gt;user.isAdmin()&lt;/STRONG&gt;&lt;SPAN&gt; instead of &lt;/SPAN&gt;&lt;STRONG&gt;user.isAdmin&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Sep 2009 23:06:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230163#M183293</guid>
      <dc:creator>mikeh</dc:creator>
      <dc:date>2009-09-25T23:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: collaboration-title.get.js accessing people object</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230164#M183294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The error describes the problem: you're trying &lt;STRONG&gt;user.isAdmin()&lt;/STRONG&gt; instead of &lt;STRONG&gt;user.isAdmin&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;Mike&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Bingo.&amp;nbsp; That worked.&amp;nbsp; Thanks a bunch.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can now see the same buttons in the rooms as the site managers can being an admin.&amp;nbsp; Of course you all have code a bit deeper to check again on site manager status before allowing someone to add someone as a member of the site so looks like I have to now drill down a bit deeper in the code to assign a site manager OR a admin the ability to add users to sites.&amp;nbsp; I'm thinking from the logs invitation.post.json.js might be a good place to start looking.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;JR&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Sep 2009 22:19:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/collaboration-title-get-js-accessing-people-object/m-p/230164#M183294</guid>
      <dc:creator>jriker1</dc:creator>
      <dc:date>2009-09-26T22:19:43Z</dc:date>
    </item>
  </channel>
</rss>

