Change Privileges (Data Management)

Summary

Establishes or changes user access privileges to the input ArcSDE datasets, stand-alone feature classes, or tables.

Usage

Syntax

ChangePrivileges_management (in_dataset, user, {View}, {Edit})
ParameterExplanationData Type
in_dataset
[in_dataset,...]

The datasets, feature classes, or tables whose access privileges will be changed.

Layer; Table View; Dataset
user

The database user name whose privileges are being modified.

String
View
(Optional)

Establishes the user's View privileges.

  • AS_ISNo change to the user's existing view privilege. If the user has view privileges, they will continue to have view privileges. If the user doesn't have view privileges, they will continue to not have view privileges.
  • GRANTAllows user to view datasets.
  • REVOKERemoves all user privileges to view datasets.
String
Edit
(Optional)

Establishes the user's Edit privileges.

  • AS_IS No change to the user's existing edit privilege. If the user has edit privileges, they will continue to have edit privileges. If the user doesn't have edit privileges, they will continue to not have edit privileges. This is the default.
  • GRANTAllows the user to edit the input datasets.
  • REVOKERemoves the user's edit privileges. The user may still view the Input dataset.
String

Code Sample

The following stand-alone script demonstrates how to grants view and edit privileges to WendelClark.

# Name: GrantPrivileges_Example.py
# Description: Grants view and edit privileges to WendelClark

# Import system modules
import arcpy

# Set local variables
datasetName = "Database Connections/gdb@production.sde/production.GDB.ctgFuseFeature"

# Execute ChangePrivileges
arcpy.ChangePrivileges_management(datasetName, "WENDELCLARK", "GRANT", "GRANT")

Environments

This tool does not use any geoprocessing environments

Related Topics

Licensing Information

ArcView: No
ArcEditor: Yes
ArcInfo: Yes

10/27/2014