<?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: permissions and user access in Developers</title>
    <link>https://communities.sas.com/t5/Developers/permissions-and-user-access/m-p/496674#M5772</link>
    <description>&lt;P&gt;Authorisation&amp;nbsp;in SAS&amp;nbsp;is set&amp;nbsp;against metadata objects (eg folders, STPs) and authentication via SASLogon.&amp;nbsp; I am not aware of an 'out of the box' way for SASLogon to determine client context (eg via SPWA&amp;nbsp;or directly through the&amp;nbsp;MSO Addin) and permit access on that basis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However,&amp;nbsp;it would be possible to inject some code at the beginning of each stp invocation to perform a kind of 'conditional abort'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The place to set your 'initialisation' code is described here:&amp;nbsp;&amp;nbsp;&lt;A href="https://support.sas.com/kb/39/250.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/39/250.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll want to test for&amp;nbsp;the existence of some automatic SPWA variable, such as `_HTCOOK` or those 'used by' 'web clients' as described here:&amp;nbsp;&amp;nbsp;&lt;A href="http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/reserved.html" target="_blank" rel="noopener"&gt;http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/reserved.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a macro to help you get the list of groups for a particular user:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/sasjs/core/blob/main/meta/mm_getgroups.sas" target="_blank" rel="noopener"&gt;https://github.com/sasjs/core/blob/main/meta/mm_getgroups.sas&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To 'abort gracefully' from an STP you need the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    data _null_;
      rc = stpsrvset('program error', 0);
    run;
    endsas;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bit of a workaround though.. Be interesting to learn if there are other solutions (short of disabling the SPWA).&lt;/P&gt;</description>
    <pubDate>Wed, 13 Oct 2021 20:00:12 GMT</pubDate>
    <dc:creator>AllanBowe</dc:creator>
    <dc:date>2021-10-13T20:00:12Z</dc:date>
    <item>
      <title>permissions and user access</title>
      <link>https://communities.sas.com/t5/Developers/permissions-and-user-access/m-p/496592#M5771</link>
      <description>&lt;P&gt;Is it possible to control who can access the SAS Stored Process web application independently of other stored process access rights?&amp;nbsp; Ultimately I'd like to create a group of users who can access the stored process web application and not allow any other users.&amp;nbsp; This would be completely indepdendent of the SAS folder access, so some users may have access to execute a stored process in MS Excel through the add-in, but have no access to open the SAS Stored Process web application at all.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2018 15:13:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/permissions-and-user-access/m-p/496592#M5771</guid>
      <dc:creator>SASBob</dc:creator>
      <dc:date>2018-09-18T15:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: permissions and user access</title>
      <link>https://communities.sas.com/t5/Developers/permissions-and-user-access/m-p/496674#M5772</link>
      <description>&lt;P&gt;Authorisation&amp;nbsp;in SAS&amp;nbsp;is set&amp;nbsp;against metadata objects (eg folders, STPs) and authentication via SASLogon.&amp;nbsp; I am not aware of an 'out of the box' way for SASLogon to determine client context (eg via SPWA&amp;nbsp;or directly through the&amp;nbsp;MSO Addin) and permit access on that basis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However,&amp;nbsp;it would be possible to inject some code at the beginning of each stp invocation to perform a kind of 'conditional abort'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The place to set your 'initialisation' code is described here:&amp;nbsp;&amp;nbsp;&lt;A href="https://support.sas.com/kb/39/250.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/39/250.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll want to test for&amp;nbsp;the existence of some automatic SPWA variable, such as `_HTCOOK` or those 'used by' 'web clients' as described here:&amp;nbsp;&amp;nbsp;&lt;A href="http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/reserved.html" target="_blank" rel="noopener"&gt;http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/reserved.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a macro to help you get the list of groups for a particular user:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/sasjs/core/blob/main/meta/mm_getgroups.sas" target="_blank" rel="noopener"&gt;https://github.com/sasjs/core/blob/main/meta/mm_getgroups.sas&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To 'abort gracefully' from an STP you need the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;    data _null_;
      rc = stpsrvset('program error', 0);
    run;
    endsas;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bit of a workaround though.. Be interesting to learn if there are other solutions (short of disabling the SPWA).&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 20:00:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/permissions-and-user-access/m-p/496674#M5772</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2021-10-13T20:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: permissions and user access</title>
      <link>https://communities.sas.com/t5/Developers/permissions-and-user-access/m-p/496694#M5773</link>
      <description>&lt;P&gt;Thanks, I'll take a look and let you know how it goes.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2018 18:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/permissions-and-user-access/m-p/496694#M5773</guid>
      <dc:creator>SASBob</dc:creator>
      <dc:date>2018-09-18T18:58:21Z</dc:date>
    </item>
  </channel>
</rss>

