ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Change Privileges

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

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

Usage

  • To edit ArcSDE datasets, both the View and Edit parameters must be set to GRANT. Edit privileges are dependent on the View privilege, since you cannot edit what you cannot see (view).

  • Edit privileges may be revoked, but you can still view the dataset. However, if the View privilege is revoked, the Edit privileges will automatically be revoked as well.

  • The relational database management system (RDBMS) equivalent command for the View parameter is Select.

  • The RDBMS equivalent commands for the Edit parameter are Update, Insert, and Delete. All three are granted or revoked simultaneously by the Edit parameter.

  • The parameter descriptions below use the terms user or user name. Database roles can also be used in place of user names. On RDBMS platforms that support operating system groups, the operating system group can also be specified in place of user names.

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_IS —No 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.
  • GRANT —Allows user to view datasets.
  • REVOKE —Removes 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.
  • GRANT —Allows the user to edit the input datasets.
  • REVOKE —Removes 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

  • Current Workspace

Licensing information

  • ArcGIS for Desktop Basic: No
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Geodatabase Administration toolset
  • Grant and revoke dataset privileges
  • An overview of the Table toolset

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal