Customizing Information Content and Access > Managing Permissions for Contexts and Equipment > Services for Granting, Propagating, and Viewing Permissions
Services for Granting, Propagating, and Viewing Permissions
The following sections detail the services available on the context manager Thing (PTC.SCA.SCO.DefaultContextManager) for granting permissions, propagating permissions, and viewing permission settings for contexts and equipment.
Services for Granting Permissions
Services are provided to grant permissions to users or to user groups. Using these services to grant permissions has the following results:
Granting Read sets the read (Read) permission to true and write (Write) permission to false.
Granting Write sets both the read (Read) and write (Write) permissions to true.
Granting None sets both the read (Read) and write (Write) permissions to false.
The permission type values (Read, Write, and None) and entity type values (Context and Equipment) in these services are case-sensitive.
The following services are available to grant permissions to users or user groups:
Service
Description
GrantUserGroupPermissionsOnEntities
Grants the specified user groups the specified permission (Read, Write, or None) to the specified entities. Context and equipment entities can both be specified for the same execution of the service. When adding entities to the entities infotable, provide the following information:
Name—The name of the context or equipment Thing as it appears in ThingWorx Composer.
Type—Enter the entity type, Context or Equipment.
GrantUserPermissionsOnEntities
Grants the specified users the specified permission (Read, Write, or None) to the specified entities. Context and equipment entities can both be specified for the same execution of the service. When adding entities to the entities infotable, provide the following information:
Name—The name of the context or equipment Thing as it appears in ThingWorx Composer.
Type—Enter the entity type, Context or Equipment.
GrantPermissionsOnEntities
Utility service used by the previously listed services. Not intended for standalone use.
Services for Propagating Permissions
The following services are available to grant permissions on a specific entity (piece of equipment) and propagate that permission to all of its children within the equipment structure for a context.
The permission type values (Read, Write, and None) in these services are case-sensitive.
Service
Description
PropagateUserGroupPermissionsOnEntities
Grants the specified user groups the specified permission (Read, Write, or None) on entities (equipment) in the specified context.
If the entityName parameter is left empty, then the specified permission is granted to the specified user groups on all equipment in the specified context.
If an entity is specified for the entityName parameter, then the specified permission is granted to the specified user groups on that entity in the specified context, and is propagated to all children of the specified entity in the equipment structure.
PropagateUserPermissionsOnEntities
Grants the specified users the specified permission (Read, Write, or None) on entities (equipment) in the specified context.
If the entityName parameter is left empty, then the specified permission is granted to the specified users on all equipment in the specified context.
If an entity is specified for the entityName parameter, then the specified permission is granted to the specified users on that entity in the specified context, and is propagated to all children of the specified entity in the equipment structure.
PropagatePermissionsOnEntities
Utility service used by the previously listed services. Not intended for standalone use.
Services for Viewing Permission Settings
The following services are available to view the current permission settings.
The permission type values (Read, Write, and None) in these services are case-sensitive.
Service
Description
GetContextPermissionByUser
Returns a list of contexts to which the specified user has permission, including the permission type (Read or Write).
GetContextPermissionByUserGroup
Returns a list of contexts to which the specified user group has permission, including the permission type (Read or Write).
GetContextsByUserAndPermission
Returns a list of contexts for which the specified user has the specified permission (Read or Write), including the details for each context.
GetEntityPermissionsByUserGroupOnContext
Returns a list of the entities (equipment) to which the specified user group has permission in the specified context, including the permission type (Read or Write) for each entity.
GetEntityPermissionsByUserOnContext
Returns a list of all entities (equipment) to which the specified user has permission in the specified context, including the permission type (Read or Write).
GetPermissionsByContext
For the specified context, returns a list of all entities (equipment) in the context; for each entity, an infotable shows the permission that each user and user group has for the entity (Read, Write, or None).
GetContextPermission and GetEntityPermissionsOnContext
Utility services used by the previously listed services. Not intended for standalone use.
Was this helpful?