Acl: IAccessControlList;
The Acl property returns additional parameters of the object security.
Executing the example requires that the repository contains an object with the Obj_1 identifier.
Sub Main;
Var
MB: IMetabase;
ObjDesc: IMetabaseObjectDescriptor;
SecDesc: ISecurityDescriptor;
AcessCL: IAccessControlList;
ACE: IAccessControlEntry;
Sec: IMetabaseSecurity;
SS: ISecuritySubject;
Sid: ISid;
Begin
MB := MetabaseClass.Active;
ObjDesc := MB.ItemById("Obj_1");
SecDesc := ObjDesc.SecurityDescriptor;
Sec := MB.Security;
SS := Sec.AllUsers.Item(10);
Sid := SS.Sid;
SecDesc.Edit;
AcessCL := SecDesc.Acl;
ACE := AcessCL.AddAce(AceType.AccessAllowed, Sid, 131071);
SecDesc.Apply(False);
End Sub Main;
After executing the example the user is added to the access control parameters for the specified object. Permissions in accordance with the "131071" mask (Full Access) are set for it in additional parameters.
See also: