IDatabase.GrantCurrentRights

Syntax

GrantCurrentRights: Boolean;

Description

The GrantCurrentRights property determines whether the permissions are granted to a database user in the new scheme, at change of the scheme name or of the server in DB properties.

Comments

The property is relevant if AutoAdjustRights is set to True. By default GrantCurrentRights is set to True.

Example

Executing the example requires that the repository contains a database with the BD identifier.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    DB: IDatabase;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById("BD").Edit;
    DB := MObj As IDatabase;
    DB.LogonData.ParamValue("SERVER") := "NewTest";
    DB.LogonData.ParamValue("SCHEME") := "NewTestShema";
    DB.AutoAdjustRights := True;
    DB.GrantCurrentRights := True;
    DB.RevokeGrantedRights := True;
    MObj.Save;
End Sub UserProc;

After executing the example, the names of server and scheme in the BD database options are changed. The permissions to access all database objects in the new scheme are automatically granted to the user at saving. The permissions in the old scheme are revoked.

See also:

IDatabase