Count: Integer;
The Count property returns the number of links with attributes of external storage areas/domains in the collection.
Add links to the ABAC, Host, and Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MS: IMetabaseSecurity;
ABACAttributes: IABACSubjectAttributes;
Mappings: IABACSubjectAttributesMappings;
Mapping: IABACSubjectAttributesMapping;
Map: IABACSubjectAttributeMapping;
i1, c1, i2, c2: Integer;
Begin
MB := MetabaseClass.Active;
MS := MB.Security;
// User attributes
ABACAttributes := MS.Users.Attributes As IABACSubjectAttributes;
// Links between user attributes and attributes of external storage areas/domains
Mappings := ABACAttributes.Mappings;
c1 := Mappings.Count;
Debug.WriteLine(c1);
For i1 := 0 To c1 - 1 Do
Mapping := Mappings.Item(i1);
Debug.WriteLine("Type of storage area/domain: " + Mapping.Provider.ToString);
If (Mapping.Provider = ExternalCatalogType.LDAP) And (Mapping.Realm <> "") Then
Debug.WriteLine("Subdomain: " + Mapping.Realm);
End If;
c2 := Mapping.Count;
Debug.WriteLine("Number of attribute links: " + c2.ToString);
Debug.Indent;
For i2 := 0 To c2 - 1 Do
Map := Mapping.Item(i2);
Debug.WriteLine("User attribute: " + Map.Attribute.Name(MetabaseClass.Active.CurrentLocale)
+ " --> " + "Storage area/domain attribute: " + Map.ExternalName);
End For;
Debug.Unindent;
Debug.WriteLine("---------------------------");
End For;
End Sub UserProc;
After executing the example the development environment console displays information about settings of links between user attributes and attributes of external storage area/domains that can be determined in the repository security manager.
See also: