canMaintainFolders

canMaintainFolders(userName: String): Integer;

The canMaintainFolders method of the JadeReportWriterSecurity class returns the type of access that the user specified in the userName parameter has to folders in the JADE Report Writer Configuration application. Access to folders is checked when the user attempts to load, extract, or maintain folders. By default, users have full access to folders in the JADE Report Writer Configuration application.

When the return value of the canMaintainFolders method is checked at the time access to folders is attempted, folders are not invoked if the user has no access. If the user has read-only access, the folders are displayed in read-only mode, and the user cannot change values.

The following example shows applying security to the use of JADE Report Writer folders.

canMaintainFolders(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;

For details about the integer values that can be returned by this method, see "JadeReportWriterSecurity Class Constants", earlier in this chapter.