IAdministrator examples

The following code updates the Security Administrators for the database:

define variable admin as IAdministrator no-undo.

admin = service:GetAdministrator( ).
admin:Administrators = "xxx@*".
service:UpdateAdministrator(admin).

The GetAdministrator( ) method in the service has no parameter and returns a single object that applies to the entire database. The pattern, "xxx@*", is a user id pattern, which can be formed following the rules of an ID pattern list as defined for the ABL built-in CAN-DO function. For more information, see the CAN-DO function entry in ABL Reference, and see the sections on user ID patterns and ABL permissions checking in Introduction to Identity Management.

See also: