Ist zwar "nur" über @formel gelöst, funktioniert aber
REM { Database Information };
_server := @Name([Abbreviate];"COMM1/WITTE/DE");
_database := "mail/ukrause.nsf";
REM { Strings to use for display };
REM { BEGIN OK To Translate };
_sTitle := "Corrective Action Error";
_sMsgNoDatabase := "Database " + _server + "!!" + _database + " was not found.";
_sMsgNoAccess := "You do not have sufficient access to modify the Access Control List for " + _server + "!!" + _database + ". Please contact a database manager.";
_sMsgZeroAccess := "You are not allowed to access " + _server + "!!" + _database + ". Please contact a database manager. Alternatively, switch to Full Access Administration mode and retry this corrective action.";
REM { END OK To Translate };
REM { @IsError(@DbExists( };
REM { Test for the existence of the database that we don't have access to };
REM { @DbExists returns @Error if the DB exists, but we don't have access };
REM { !@DbExists( };
REM { Test for the existence of the database };
REM { @IsError(@UserAccess };
REM { Test for zero access to the database };
REM { @TextToNumber(@UserAccess };
REM { Test for proper access to the database };
@If(
@IsError(@DbExists(_server : _database));
@Do(
@Prompt([Ok]; _sTitle; _sMsgZeroAccess);
@Return("")
);
@If(
!@DbExists(_server : _database);
@Do(
@Prompt([Ok]; _sTitle; _sMsgNoDatabase);
@Return("")
);
@If(
@IsError(@UserAccess(_server : _database));
@Do(
@Prompt([Ok]; _sTitle; _sMsgZeroAccess);
@Return("")
);
@TextToNumber(@UserAccess(_server : _database)[1]) < 6;
@Do(
@Prompt([Ok]; _sTitle; _sMsgNoAccess);
@Command([FileOpenDatabase]; _server : _database);
@UpdateFormulaContext;
@Command([FileDatabaseACL])
);
@Do(
@Command([FileOpenDatabase]; _server : _database);
@UpdateFormulaContext;
@Command([FileDatabaseACL])
)
)
)
)
Ist übrigens aus der DDM Datenbank