The Solaris_UserAcl class extends the Solaris_Acl base class, from which it inherits the string property capability with a default value r (read only).
You can set the capability property to any of the following values for access privileges.
| Access Right | Description |
|---|---|
|
r |
Read |
|
rw |
Read and Write |
|
w |
Write |
|
none |
No access |
The Solaris_UserAcl class defines the following two key properties. Only one instance of the namespace-username ACL pair can exist in a namespace.
| Property | Data Type | Purpose |
|---|---|---|
|
nspace |
string |
Identifies the namespace to which this ACL applies. |
|
username |
string |
Identifies the user to which this ACL applies. |
Create an instance of the Solaris_UserAcl class. For example:
// Get the Solaris_UserAcl class
cimclass = cc.getClass(newCIMObjectPath("Solaris_UserAcl");
// Create a new instance of the Solaris_UserAcl class
ci = cimclass.newInstance();
Set the capability property to the desired access rights. For example:
/* Change the access rights (capability) to read/write
for user Guest on objects in the root\molly namespace.
ci.updatePropertyValue("capability",new CIMValue("rw"));
ci.updatePropertyValue("nspace",new CIMValue("root\molly"));
ci.updatePropertyValue("username",new CIMValue("guest"));
Update the instance. For example:
// Pass the updated instance to the CIM Object Manager cc.setInstance(new CIMObjectPath(), ci);