Product Information > JADE Object Manager Guide > Chapter 2 - JADE Security > Deployed JADE Database Inspection Security

Deployed JADE Database Inspection Security

To restrict access to class instance inspection in a deployed (run time) database, you can implement the allowedToInspect security filter method for the class or classes to which you want to restrict access.

The allowedToInspect method must have the following signature.

allowedToInspect(userName: String;
                 password: String): Boolean;

If the allowedToInspect method is present on a class, the Schema Inspector prompts for a user name and password, and calls the allowedToInspect method, passing these values as parameters. If the allowedToInspect method returns true, the instances of that class are displayed. If this method returns false, a message box is displayed, informing the user that he or she does not have sufficient security rights to inspect instances of that class.

As the allowedToInspect method defaults to false in a runtime application, no instances can be inspected if you do not implement the allowedToInspect method to return true in a runtime system. (This ensures that any user of the Schema Inspector in a runtime application can inspect only those classes to which access has been specifically permitted by the application software developer.)

The allowedToInspect method applies to the class in which it is implemented and to any subclasses of that class. To restrict deployment inspection access for all classes, implement the allowedToInspect method for the Object class.

The following example shows the implementation of the allowedToInspect method in a user-defined Employee class to restrict deployment inspection access to that class by all users other than wilbur2, who has a password of taonga.

allowedToInspect(userName, password: String): Boolean;
begin
    if userName = "wilbur2" and password = "taonga" then
        return true;
    else
        return false;
    endif;
end;

For details about the Schema Inspector, see Chapter 1, "Inspecting a Deployed Database", in the JADE Schema Inspector Utility User’s Guide.