AutoCAD Map 3D 2009 Geospatial Platform Reference

AutoCAD Map 3D Geospatial Platform API

virtual void MgResourceService::InheritPermissionsFrom ( MgResourceIdentifier resource  )  [pure virtual]

Sets the permissions for all descendants of a specified folder to be inherited from the folder.

Note:
This is not valid with AutoCAD Map 3D. It works with MapGuide only.
Remarks:
For example, if the folder "Library://Geography/" contains a map and a subfolder containing two feature sources, using this will set the map, the subfolder, and the feature sources all to "inherit".
This method only works on items in the library repository, not in session repositories.
.NET Syntax
virtual void InheritPermissionsFrom(MgResourceIdentifier resource);
Java Syntax
virtual void InheritPermissionsFrom(MgResourceIdentifier resource);
PHP Syntax
virtual void InheritPermissionsFrom(MgResourceIdentifier resource);

Parameters:
resource (MgResourceIdentifier) Folder that permissions are to be inherited from. You must include the trailing slash in the identifier.
Returns:
Returns nothing.
Example (PHP)
 // Assuming $resourceService is already initialized.
 $resourceID= new MgResourceIdentifier("Library://Geography/");
 $resourceService->InheritPermissionsFrom($resourceID);

Exceptions:
MgPermissionDeniedException 
MgResourceNotFoundException 
MgInvalidRepositoryTypeException 
MgInvalidRepositoryNameException 
MgInvalidResourcePathException 
MgInvalidResourceNameException 
MgInvalidResourceTypeException 
Note:
You must be logged in as the Administrator or the current owner to use this method.