<?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 Allowing non site managers to use &amp;quot;inviteNominated&amp;quot; in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/allowing-non-site-managers-to-use-quot-invitenominated-quot/m-p/292414#M245544</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am fairly new to Alfresco and could not find an answer to my question on the forums. My problem is the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm building an application on top of Alfresco. In this application, some users have the right to invite external users to a site. In order to do this, I have written a webscript which uses the "inviteNominated" function. This function works well as long as the user calling the webscript is a Site Manager but does not work when he is not (as expected).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My first solution was to mark the webscript with runas="admin" but this does not seem to work. Indeed, when running the script as an admin, the user is able to do most things (create a new user, set permissions, ...) but it would appear the inviteNominated function still denies access despite the runas="admin" marker. I get the following error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;org.alfresco.service.cmr.invitation.InvitationExceptionForbidden: 11010032 "Current user, x, is not a Site Manager for site: y"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My current solution is to temporarily add the user to the SiteManager group for the site in question with :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;people.addAuthority(siteManagerGroup, person);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;site.inviteNominated(...);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;people.removeAuthority(siteManagerGroup, person);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works but it feels less than ideal since during the (arguably small) time the webscript is running the inviteNominated function, the user is actually a site manager, which I would like to avoid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a better way to solve this problem ?&lt;BR /&gt;&lt;BR /&gt;Thank you in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Dec 2016 16:46:32 GMT</pubDate>
    <dc:creator>baplac</dc:creator>
    <dc:date>2016-12-01T16:46:32Z</dc:date>
    <item>
      <title>Allowing non site managers to use "inviteNominated"</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/allowing-non-site-managers-to-use-quot-invitenominated-quot/m-p/292414#M245544</link>
      <description>Hello,I am fairly new to Alfresco and could not find an answer to my question on the forums. My problem is the following:I'm building an application on top of Alfresco. In this application, some users have the right to invite external users to a site. In order to do this, I have written a webscript</description>
      <pubDate>Thu, 01 Dec 2016 16:46:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/allowing-non-site-managers-to-use-quot-invitenominated-quot/m-p/292414#M245544</guid>
      <dc:creator>baplac</dc:creator>
      <dc:date>2016-12-01T16:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Allowing non site managers to use "inviteNominated"</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/allowing-non-site-managers-to-use-quot-invitenominated-quot/m-p/292415#M245545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no way to extend that privilege to users outside of the site manager role. This is a business restriction programmed into the invitation service and not actually related to permission which is why it does not work simply by putting runAs=admin in there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Really the only option to achieve this would require replacing the invitation service implementation with something custom, which certainly is too much effort to be worth it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Dec 2016 20:28:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/allowing-non-site-managers-to-use-quot-invitenominated-quot/m-p/292415#M245545</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2016-12-01T20:28:24Z</dc:date>
    </item>
  </channel>
</rss>

