Appendix A. Forms 6 i Security


Appendix A. Forms 6 i Security

Throughout this book, I've said that ultimately we would be applying security to the forms , not the user . This would protect our database because users would not have rights to the tables, hence could not change anything if they were to get to a SQL prompt and log in.

Here's how we're going to do this (four quick steps):

  • Create a universal userWAIVER_USERwith basic capabilities.

  • Create a powerful rolewe'll use the WAIVER_DEV_ROLE.

  • Assign that role to our MAIN MENU.

  • Assign that role to each MENU ITEM.

  1. First, create a general user that will be used by everyone taking an exam. Refer back to Chapter 8 for a refresher on Roles, Profiles, and Users. Now create the user 'Waiver_User' with the same password, unlimited logons , tablespaces, and so forth. Limit the time to 2 hours, then grant basic rights such as create session. If you have a general ROLE, then grant that role to WAIVER_USER. Now log on to the database as that user, correct any problems, and make sure the user cannot see any of the Waiver tables.

  2. Start FORMS, and select your CWE1P_MENU.MMB module. Highlight CWE1P_MENU, right-click and select Property Palette. Then, change USE SECURITY to YES :

    graphics/afig01.gif

    graphics/afig02.gif

  3. Now, click on the MODULE ROLES, and you'll see "More" to the right. Click on More, and in the box that appears, enter the WAIVER_DEV_ROLE that you created back in Chapter 8. This role should have very powerful rights to all tables. If you didn't create it properly, you'll know shortly!

    graphics/afig03.gif

  4. Finally, add the same ROLE to the four menu items: Exams, Administration, Exit, and Help. Double click to open the CWE1P_MAIN_MENU, click on Exams, then hold the shift key down and click on HELP so that all four items are highlighted. You're going to make the change to all four at the same time. Now right-click, select Property Palette and the "? Item Roles", click on "More", click "OK" to the Multiple Objects box, and enter the Role:

    graphics/afig04.gif

    graphics/afig05.gif

    graphics/afig06.gif

Of course, you could have completed each menu item one at a time. Since there aren't any more menus , compile your MENU module, then compile your FORMS, and you're ready to test with your generic user ID.



Guerrilla Oracle
Guerrilla Oracle: The Succinct Windows Perspective
ISBN: 0201750775
EAN: 2147483647
Year: 2003
Pages: 84

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net