BS Toolkit for Opera II

BS Authorise

Field by field access control for Opera II

“I don’t want the operators to change credit limits”

“I don’t want some of the staff to see some of the payroll”

“I want to change Reference 1 to Invoice No.”


BS Authorise allows the system manager to restrict access to the controls on any form.  We have added a Data Access Code to the User profile.  This code (0-9) governs the user’s access to each control.  Each control can be removed from the form or made read only for each Data access Code.


 

You might think of the Data Access Code as another profile or as a category of operator ranging from Admin(0) to Least Trusted (9).

The screen below shows how every field, on every form which has this facility enabled, can be made invisible or read only for each of the classes of user

The default is for the control to be visible to all and read write for all.  This does not over-ride any restrictive settings made within OperaII.


 

Any forms which are to include this facility must be modified by an Opera II developer; who has to insert some code as shown below.  Thereafter, access can be managed by the installer or the user.

You should use caution in changing access to any Opera II non_data controls.

Some Opera programs make controls visible dynamically and controls which you have made invisible will re-appear. By experimentation you may be able to re-impose your authorisations

Coding

These lines are required in the Load method

With thisform

    .addproperty("oAuthorise")

    .oAuthorise=createobject("BSAuthorise")

       .oAuthorise.authorise(thisform)       && can be repeated as required e.g. if Opera subsequently makes controls visible

endwith

If the whole form is to be made unavailable the following steps should can be taken:

A control such as a label should be added  to the form.  (it must be named bs_authorised). 

If the form is to be available, this control must be visible to this user.  It might be your logo or minimalised (e.g. caption = “ ”) or it might be meaningful (e.g. “Access approved for”+ps_user). 

The following code should be placed in the GotFocus method of the first control to get focus. 

with thisform

        if !.bs_Authorised.visible

               .cmdcancel.click              && or whatever to close the form

        endif

endwith

bs


better software

home

To contact us

Click Here

or call
01383 727409


42 Main Street,
Crossford
Dunfermline
Fife
Scotland
KY12 8NJ