PutSecurity Method (IPISecurity2 interface)

              

 

Puts the security attributes for the object.

 

Syntax

object.PutSecurity pnvsSecurity

 

The PutSecurity method syntax has these parts:

Part

Description

object

An object that evaluates to a reference to an IPISecurity2 interface.  See the Applies To list in the IPISecurity2 definition for a list of objects that support this interface.

pnvsSecurity

NamedValues collection of new security attributes for the object.

 

The NamedValues collection (pnvsSecurity) may contain the following items:

Name

Value

Owner

A string with the name of the PIUser who is the owner of the object.

Group

A string with the name of the PIGroup whose access rights are specified in the Access attribute

Access

String that specifies the access rights of the owner, group, and world. Example: "o:wr g:r w:r"

Security

PI 3.4.380 servers or later only. This security string contains an Access Control List (ACL) of PI Identities and their access rights. 
Example:
"piadmin: A(r,w) | PIAdministrators: A(r) | piworld: A(r)".

 

Remarks

For PI 3.4.380 or later servers, the Security attribute supersedes the Owner, Group, and Access attributes. The Owner, Group, and Access attributes are stil supported to the extent possible to be backwards compatible with applications that use them. If your application is connected to a PI 3.4.380 server, you only need to return the Security attribute to change the security of an object.

 

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error

Description

pseNOGENSERVER and psePISERVERDBBASENOTINITIALIZEDERROR

The underlying server abstraction layer could not be accessed.

pseSECURITYITEMNOTFOUND

The NamedValues collection passed in was missing one of the required items.

 

Enabling Operational Intelligence