canAccessConfiguration

canAccessConfiguration(userName: String): Integer;

The canAccessConfiguration method of the JadeReportWriterSecurity class returns the type of access that the user specified in the userName parameter has to the JADE Report Writer Configuration application when it is invoked by that user.

The following example shows how to control access to a JADE Report Writer application, in this case the JADE Report Writer Configuration application.

canAccessConfiguration(userName: String): Integer;
begin
    if process.userCode = "USER1" then
        return FULL_ACCESS;
    elseif process.userCode = "USER2" then
        return READ_ONLY_ACCESS;
    else
        return NO_ACCESS;
    endif;
end;

In this example, USER1 has full access to the JADE Report Writer Configuration application, which means that USER1 can create and change reporting views. USER2 has read-only access, and every other user is prevented from running the JADE Report Writer Configuration application.

By default, users have full access to the JADE Report Writer Configuration application (that is, they can both access and change views, folders, and system options). When the return value of this method is checked at the time the application is invoked, the application is not started if the user has no access. If the user has read-only access, the application is started in read-only mode and the user can access but not change views, folders, and system options. For details about the integer values that can be returned by this method, see "JadeReportWriterSecurity Class Constants", earlier in this chapter.