Name(Locale: LocaleCodeID): String;
Locale. Name language.
The Name property determines an attribute name.
This property is relevant when a new attribute is added for users, groups of users, object classes, particular object types.
To execute the example, add links to the ABAC, Metabase, and Dal system assemblies.
Sub UserProc;
Var
ABACAttribute: IABACAttribute;
ABACAttributes: IABACAttributes;
MB: IMetabase;
MS: IMetabaseSecurity;
Lic: Object;
Begin
MB := MetabaseClass.Active;
// Get license to be able to work with security manager
Lic := MB.RequestLicense(UiLicenseFeatureType.Adm);
MS := MB.Security;
// Add an attribute for users
ABACAttributes := MS.Users.Attributes;
ABACAttribute := ABACAttributes.Add;
ABACAttribute.Name(MB.CurrentLocale) := "Users";
ABACAttribute.Id := "WorkDays";
ABACAttribute.Description(MB.CurrentLocale) := "Number of working days";
ABACAttribute.DefaultValue := 20;
ABACAttribute.DataType := DbDataType.Integer;
// Display key of the new attribute in the console
Debug.WriteLine("Key of the new attribute: " + ABACAttribute.Key.ToString);
// Save changes in security manager
MS.Apply;
// Check in license
Lic := Null;
End Sub UserProc;
After executing the example the attribute is added for users in the security manager:
The key of the new attribute is displayed in the console:
New attribute key: 17
See also: