<?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 ArcGIS - Python- Privs Scripts in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcgis-python-privs-scripts/m-p/397708#M31379</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am new to ArcGIS. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are using ArcGIS 10.0 .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We are sunning SQL 2008 R2 with SQL role based security connected to Active directory global groups.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We are connecting using the connection properties... sde:sqlserver:&amp;lt;servername\instance&amp;gt; with OS authentication.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are in a rebuild mode, which requires the administrator to re-apply permissions to an average 50 items in catalog with more than 50 AD global groups for each item.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is quite time consuming...&amp;nbsp; ;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have a python script for doing this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Melissa&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Oct 2012 16:57:14 GMT</pubDate>
    <dc:creator>MelissaStenger</dc:creator>
    <dc:date>2012-10-02T16:57:14Z</dc:date>
    <item>
      <title>ArcGIS - Python- Privs Scripts</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-python-privs-scripts/m-p/397708#M31379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am new to ArcGIS. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are using ArcGIS 10.0 .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We are sunning SQL 2008 R2 with SQL role based security connected to Active directory global groups.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We are connecting using the connection properties... sde:sqlserver:&amp;lt;servername\instance&amp;gt; with OS authentication.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We are in a rebuild mode, which requires the administrator to re-apply permissions to an average 50 items in catalog with more than 50 AD global groups for each item.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is quite time consuming...&amp;nbsp; ;(&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have a python script for doing this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Melissa&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2012 16:57:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-python-privs-scripts/m-p/397708#M31379</guid>
      <dc:creator>MelissaStenger</dc:creator>
      <dc:date>2012-10-02T16:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS - Python- Privs Scripts</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-python-privs-scripts/m-p/397709#M31380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure if this is what you are looking for. I use DB managed groups instead of AD users, so you will need to find a way to tap into AD to get your list of users to grant the privileges to and loop through them. The win32api or active_directory modules should be able to get what you want. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://timgolden.me.uk/python/active_directory.html" rel="nofollow noopener noreferrer" target="_blank"&gt;http://timgolden.me.uk/python/active_directory.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.python.org/getit/windows/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.python.org/getit/windows/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
sde = r"sde_instance_path.sde"
arcpy.env.workspace = sde
fc_List = arcpy.ListFeatureClasses("some_filter")
fc_List.sort()
for fc in fc_List:
&amp;nbsp;&amp;nbsp;&amp;nbsp; try:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Granting privileges to " + fc
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ChangePrivileges_management(fc, "# group/user to grant priv", "GRANT")
&amp;nbsp;&amp;nbsp;&amp;nbsp; except:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Passing " + fc
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:10:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-python-privs-scripts/m-p/397709#M31380</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2021-12-11T18:10:46Z</dc:date>
    </item>
  </channel>
</rss>

