<?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: Use attribute rules to limit access rights in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/use-attribute-rules-to-limit-access-rights/m-p/1170551#M54735</link>
    <description>&lt;P&gt;You could certainly do something like that.&lt;/P&gt;&lt;P&gt;For the user portion, the &lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#getuserportalobject-username---dictionary" target="_blank"&gt;GetUser function&lt;/A&gt; is precisely what you need. As far as the external table, pulling in that information really depends on where and how it's stored, but &lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#featuresetbyportalitem" target="_blank"&gt;FeatureSetByPortalItem&lt;/A&gt;&amp;nbsp;is the most flexible function for getting another layer, since it can grab any published service.&lt;/P&gt;&lt;P&gt;You could also just hard-code the user lists into the attribute rule itself, which would probably perform better than making repeated calls to another table. But the external table has the benefit of being editable without having to alter the attribute rule expression, so I can see wanting to go that route, too.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var the_user = GetUser(your_layer_object)['username']

var g1_users = [
    'JohnDoe',
    'JaneDoe',
    'JoshCarlson'
]

var g2_users = [
    'JohnQPublic',
    'Kilroy'
]

if (Includes(g1_users, the_user)){

    // some kind of validation specific to group 1

} else if (Includes(g2_users, the_user)){

    // some kind of validation specific to group 2

} else {

    // fallback response for unmatched user

}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 May 2022 11:56:16 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2022-05-04T11:56:16Z</dc:date>
    <item>
      <title>Use attribute rules to limit access rights</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-attribute-rules-to-limit-access-rights/m-p/1170501#M54731</link>
      <description>&lt;P&gt;I would like to use attribute rules to implement some way to limit edits by people.&lt;/P&gt;&lt;P&gt;The data is within enterprise geodatabase (oracle) and is updated by Pro.&lt;/P&gt;&lt;P&gt;For example some user can create a line not longer then 1 KM while other can create a line up to 2KM long.&lt;/P&gt;&lt;P&gt;The attribute rue should get the user (active directory user). Go to some external table (not necessary in the same schema as the layer), find if the user belong to the first or second group. Check the line that was created and improve or reject the new feature.&lt;/P&gt;&lt;P&gt;Can something like that be done in Arcade as attribute rule?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 05:04:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-attribute-rules-to-limit-access-rights/m-p/1170501#M54731</guid>
      <dc:creator>mody_buchbinder</dc:creator>
      <dc:date>2022-05-04T05:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Use attribute rules to limit access rights</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-attribute-rules-to-limit-access-rights/m-p/1170551#M54735</link>
      <description>&lt;P&gt;You could certainly do something like that.&lt;/P&gt;&lt;P&gt;For the user portion, the &lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#getuserportalobject-username---dictionary" target="_blank"&gt;GetUser function&lt;/A&gt; is precisely what you need. As far as the external table, pulling in that information really depends on where and how it's stored, but &lt;A href="https://developers.arcgis.com/arcade/function-reference/data_functions/#featuresetbyportalitem" target="_blank"&gt;FeatureSetByPortalItem&lt;/A&gt;&amp;nbsp;is the most flexible function for getting another layer, since it can grab any published service.&lt;/P&gt;&lt;P&gt;You could also just hard-code the user lists into the attribute rule itself, which would probably perform better than making repeated calls to another table. But the external table has the benefit of being editable without having to alter the attribute rule expression, so I can see wanting to go that route, too.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var the_user = GetUser(your_layer_object)['username']

var g1_users = [
    'JohnDoe',
    'JaneDoe',
    'JoshCarlson'
]

var g2_users = [
    'JohnQPublic',
    'Kilroy'
]

if (Includes(g1_users, the_user)){

    // some kind of validation specific to group 1

} else if (Includes(g2_users, the_user)){

    // some kind of validation specific to group 2

} else {

    // fallback response for unmatched user

}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 11:56:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-attribute-rules-to-limit-access-rights/m-p/1170551#M54735</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-05-04T11:56:16Z</dc:date>
    </item>
  </channel>
</rss>

