RevokeGrantedRights: Boolean;
The RevokeGrantedRights property determines whether the permissions of DB user are revoked in the old scheme, at changing the name of the scheme or of the server in properties of DB.
This property is relevant if AutoAdjustRights is set to True. By default RevokeGrantedRights is set to False.
Executing this 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: