Security Object

Window/Menu/Control/DataWindow Security

The security object is a non-visual class user object that secures other objects. This object knows how to enable/disable windows, menus, controls and DataWindow object columns.

This object uses a simple database design to allow the end user to define system users and associate privileges and roles with a user. The privileges are what determine what a user can and cannot perform.

The object uses the tag value to determine what privilege is need to view or edit object or item. Many developers are using the tag value for many different purposes. We have a standard to insure the tag value can be used for any reason. Values placed in the tag must be identified, i.e., security=" enable=god visible=woman ". This allows multiple values to be placed in the tag value such as security and micro help. microhelp="Enter Last Name" security=" enable=god visible=woman " Our u_dw_super has intelligence to parse identified strings.

There are three main steps to using security:

Add a global variable to your application: u_nv_security gnv_security
Set up tag values for all objects you want secured
Use the Security front-end to set up users and resources
1. The global variable is used for convience to make it easy to secure all objects. u_nv_security must beable to connect to the security database. The demo uses security.db, and connects through a nvo u_nv_connect_security. This is the same object the front-end uses. If you need to change the connection values edit u_nv_connect_security.

2. To secure an application you need to specify a tag value for each object you want secured. In the tag value you identify what resource is needed to enable and view the object. During runtime the "u_nv_security" object will verify a users resources to the resources needed in the tag value. You can, but do not have to specify an unique tag value or each object.
Example: cb_save, tag value: security="enable=admin visible=clerk" or
cb_save, tag value: security="ecbsave=admin visible=vcbsave"
After placing a value in all objects you want secure you need to set up

3. Use the security front-end to create Users, Roles and Resources. You need to create a user for for every person that will be using the system. You also need to create a resource for every tag value you specified. Once you have created all the users and resources you can associate a resource directly with a user or you can create roles and and associate resources with a role and then associate a role with a user. The security front-end makes it very easy to set up the association. The main window displays from top to bottom Users, Roles and Resources. To create a new user, role or resources right mouse click in the appropriate box.

User

Role

Resource/Tag

After creating users, roles and resources you can drag-and-drop resources onto roles or users and you can drag-and-drop roles onto users. You can go into any object and create associations by selecting the appropriate tab. In the example below I can Assign Roles and Assign Resources.

//Constructor Event DataWindow - Assumes you checked IsValid()
gnv_security.uf_Security( this )
//Open Event of Window - Assumes you checked IsValid()
gnv_security.uf_Security( this.menuid )

//Constructor Event Command Button - Assumes you checked IsValid()
gnv_security.uf_Security( this )

Contact Us


PowerObjects Logo

718 Washington Ave. N.
Suite 202
Minneapolis, MN 55401
612.339.3355
1.866.770.3355
info@powerobjects.com

Passion

"Leverage technology to solve business problems."


Core Values

  • Always Add Value
  • Think Team
  • Love What You Do
  • Live the Technology
  • Do the Right Thing

Exchange Hosting

PowerObjects is now offering full service MS Exchange hosting at $9.95 per 500 MB mailbox!

Contact sales@powerobjects.com

» learn more