Tms Software Tms Security System Developers Quick Start Guide
Tms Software Tms Security System Developers Quick Start Guide
Tms Software Tms Security System Developers Quick Start Guide
Sep 2010
Copyright © 2003 – 2010 by tmssoftware.com bvba
Web: http://www.tmssoftware.com
Email : [email protected]
1
TMS SOFTWARE
TMS SECURITY SYSTEM
DEVELOPERS QUICK START GUIDE
Contents
2
TMS SOFTWARE
TMS SECURITY SYSTEM
DEVELOPERS QUICK START GUIDE
The TMS Security System can be simultaneously installed and used on multiple development
environments on a single machine.
Windows 98SE
Windows ME
Windows 2000
Windows XP
Windows 2003 server
Windows Vista
Windows 2008 server
Windows 7
3
TMS SOFTWARE
TMS SECURITY SYSTEM
DEVELOPERS QUICK START GUIDE
Installation
Make sure to first uninstall any possible previous version of the TMS Security System that might have
been previously installed. A correct uninstall means:
2. Unzip the TMS Security System ZIP file into a new folder “TMSDIR”.
Make sure to unzip with option to keep the relative directory structure. “TMSDIR” can be your
directory of choice, for example: C:\Program Files\Borland\TMS\
Under Tools, Environment Options, Library, Library path, add the directory where the TMS
components have been installed to the library path as well as the subdirectory XlsAdapter, ie.
“TMSDIR”
4. Install packages
In Delphi or C++Builder, select from the menu File, Open and browse for the appropriate package
file:
Delphi 5 : TSSCoreD5.DPK
Delphi 6 : TSSCoreD6.DPK
Delphi 7 : TSSCoreD7.DPK
Delphi 2005 : TSSCoreD2005.BDSPROJ
Delphi 2006 : TSSCoreD2006.BDSPROJ
Delphi 2007 : TSSCoreD2007.DPROJ
Delphi 2009 : TSSCoreD2009.DPROJ
Delphi 2010 : TSSCoreD2010.DPROJ
Delphi XE : TSSCoreD2011.DPROJ
C++Builder 5 : TSSCoreC5.BPK
C++Builder 6 : TSSCoreC6.BPK
C++Builder 2006 : TSSCoreC2006.BDSPROJ
C++Builder 2007 : TSSCoreC2007.CBPROJ
C++Builder 2009 : TSSCoreC2009.CBPROJ
C++Builder 2010 : TSSCoreC2010.CBPROJ
C++Builder XE : TSSCoreC2011.CBPROJ
In Delphi or C++Builder, select from the menu File, Open and browse for the appropriate package
file:
4
TMS SOFTWARE
TMS SECURITY SYSTEM
DEVELOPERS QUICK START GUIDE
Delphi 5 : TSSUID5.DPK
Delphi 6 : TSSUID6.DPK
Delphi 7 : TSSUID7.DPK
Delphi 2005 : TSSUID2005.BDSPROJ
Delphi 2006 : TSSUID2006.BDSPROJ
Delphi 2007 : TSSUID2007.DPROJ
Delphi 2009 : TSSUID2009.DPROJ
Delphi 2010 : TSSUID2010.DPROJ
Delphi XE : TSSUID2011.DPROJ
C++Builder 5 : TSSUIC5.BPK
C++Builder 6 : TSSUIC6.BPK
C++Builder 2006 : TSSUIC2006.BDSPROJ
C++Builder 2007 : TSSUIC2007.CBPROJ
C++Builder 2009 : TSSUIC2009.CBPROJ
C++Builder 2010 : TSSUIC2010.CBPROJ
C++Builder XE : TSSUIC2011.CBPROJ
For Delphi 6,7 it is required to first put the SecuritySystem.ALS file in the {$DELPHI}\Help directory.
Go through menu Help, Customize and add following file to the Index tab:
Delphi 5 : SecuritySystemD5.HLP
Delphi 6 : SecuritySystemD6.HLP
Delphi 7 : SecuritySystemD7.HLP
Delphi 2005 : close the IDE & run RegHelp2 –I SECURITYSYSTEMDBDS3.Hxx
Delphi 2006 : close the IDE & run RegHelp2 –I SECURITYSYSTEMDBDS4.Hxx
Delphi 2007 : close the IDE & run RegHelp2 –I SECURITYSYSTEMDBDS5.Hxx
Delphi 2009 : close the IDE & run RegHelp2 –I SECURITYSYSTEMDRS2009W.Hxx
Delphi 2010 : close the IDE & run RegHelp2 –I SECURITYSYSTEMDRS2010W.Hxx
Delphi XE : close the IDE & run RegHelp2 –I SECURITYSYSTEMDRSXE.Hxx
C++Builder 5 : SecuritySystemB5.HLP
C++Builder 6 : SecuritySystemB6.HLP
C++Builder 2006 : close the IDE & run RegHelp2 –I SECURITYSYSTEMBBDS4.Hxx
C++Builder 2007 : close the IDE & run RegHelp2 –I SECURITYSYSTEMBBDS5.Hxx
C++Builder 2009 : close the IDE & run RegHelp2 –I SECURITYSYSTEMBRS2009W.Hxx
C++Builder 2010 : close the IDE & run RegHelp2 –I SECURITYSYSTEMBRS2010W.Hxx
C++Builder XE : close the IDE & run RegHelp2 –I SECURITYSYSTEMBRSXE.Hxx
The recommended procedure to install the Security System in different Delphi or C++Builder
environments on a single machine is to unzip the TMS Security System into a different folder for
each Delphi or C++Builder version and to use as such a different library path for each Delphi or
C++Builder version.
5
TMS SOFTWARE
TMS SECURITY SYSTEM
DEVELOPERS QUICK START GUIDE
Updates
The TMS Security System comes with a full version cycle of free updates. A full version cycle means
that from version x.y to version x+1.y, the updates are free. For example, if a registration starts at
version v2.1, updates are free till version v3.1. The latest date of the updates can be seen after
login on our website (see next section). This date reflects the exact file date of the latest update.
Support
Information about peer to peer newsgroups access and priority support email for registered users is
available after login on our website.
Website login
Registered users of the TMS Security System receive a code with which it is possible to login on the
website to obtain:
Important notes
If for some reason, your registration email address changes, the only way to have this updated is by
sending email to TMS software to request for a change. The email must be sent from the original
email address and specify the new address to change to.
Make sure to use an email account that can handle file attachments up to 2.0MB.
6
TMS SOFTWARE
TMS SECURITY SYSTEM
DEVELOPERS QUICK START GUIDE
License agreement
The TMS Security System is available with two licensing schemes, a single developer license and a
site license. The details of the two license types are below:
The single developer license of the component gives you the right to:
Using the component(s) for development of applications or any type of software module in
general by a single developer within the company holding the license.
Sell any commercial compiled application with the control, published by the company
holding the license
Make modifications to the source code of component for own use.
Use the component and source code on all development systems used by the developer
assigned by the company holding the license.
Request future versions of the component at any time either through the web or by email
for a full version cycle of the component.
Access to priority email support by the single developer assigned by the company holding
the license.
Sell any number of applications in any quantity without any additional run-time fees or
royalties required.
Distributing parts or full source code of any component from TMS software.
Using parts or full source code of components from the TMS software for creating any type
of other components that are distributed or sold with or without source code.
Changing the source code of any component from TMS software and sell or distribute this as
a modified product.
Creating a descendant compiled product such as OCX or ActiveX control and sell or
distribute this as a product.
Using the control in applications sold with different publisher name than the company
holding the license.
Transfer the license to any other developer than the original registered developer
Using the components by multiple developers in the company holding the license
The site license of the component gives you the right to:
Using the component(s) for development of applications or any type of software module in
general by a single developer within the company holding the license.
Sell any commercial compiled application with the control, published by the company
holding the license
Make modifications to the source code of component for own use.
Use the component and source code on all development systems used by the developer
assigned by the company holding the license.
Request future versions of the component at any time either through the web or by email
for a full version cycle of the component.
Access to priority email support by the single developer assigned by the company holding
the license.
Sell any number of applications in any quantity without any additional run-time fees or
royalties required.
7
TMS SOFTWARE
TMS SECURITY SYSTEM
DEVELOPERS QUICK START GUIDE
Change at any time the number of developers using the TMS software components within
the company holding the license.
Notify TMS software at any time to allow new developers within the company to access the
priority email support.
Allow any number of developers within the company holding the license to access the web
based interface for obtaining product updates.
Distributing parts or full source code of any component from TMS software.
Using parts or full source code of components from the TMS software for creating any type
of other components that are distributed or sold with or without source code.
Changing the source code of any component from TMS software and sell or distribute this as
a modified product.
Creating a descendant compiled product such as OCX or ActiveX control and sell or
distribute this as a product.
Using the control in applications sold with different publisher name than the company
holding the license.
Transfer the license to any other developer not working for the company holding the
license.
Termination of license
The license agreement terminates immediately after violation of any of the terms and conditions
described. A termination of the license means that the company has no longer any rights to use the
components for development, sell applications using the components, obtain free updates of the
components and is no longer entitled to email support or any other form of support.
The company or developer holding the license is responsible for respecting the terms and conditions
of the license agreement and shall thus make sure that no other person has access to the TMS
Components to use these for any purposes that violate the license agreement.
8
TMS SOFTWARE
TMS SECURITY SYSTEM
DEVELOPERS QUICK START GUIDE
Component Overview
The TMS Security System is a set of component that facilitates management of user-rights in
applications. Handling user-rights is done by login / logout of users in the application and
controlling at component level what components are enabled / visible / editable for the profile of
the user that logged in.
The TuilSecurityManager is the core of the security system. Only one is required in any project. It
keeps track of who is logged in and what permissions they have. Other components in the security
system connect to this component to do their duties.
The Security Manager requires six tables to track what accesses are available and who has them.
Each table is broken into a Bindary. A binary sets the relationship between fields in the various
tables and information needed for the Security System. There are 3 bindaries: UserBindary,
GroupBindary and PermissionBindary. The UserBindary has a UserPermissions bindary, and the
GroupBindary has GroupPermissions and GroupMembership bindaries. Each bindary connects to a
DataSource, representing the data held by that bindary.
User table
Groups table
9
TMS SOFTWARE
TMS SECURITY SYSTEM
DEVELOPERS QUICK START GUIDE
Permissions table
To get started, create the tables as described above in your favourite database. Any TDataset
compatible database with update-able queries should work fine as the Security System uses the
standard TDataSet properties & methods only. Put these tables with datasources to the main
application form or a datamodule. Drop the TuilSecurityManager component on the form and
connect the bindary properties with all tables. If you double-click the component, and you have set
up all the Bindaries, you can edit the users, groups and accesses using the same dialog as with the
TuilSecurityDlg component.
To apply security policies to a form, drop the TuilFormPolicy on the form and double-click to start
editing the form policies. From the TuilFormPolicy editor, different policies can be added that each
can control different components with different actions on the form. The actions can be set by
clicking on the policy name and setting from the toolbar or rightclick popup menu to:
Once users are setup and policies are added to the forms where you want to control user-rights,
perform the login / logout in the Security System with the TuilLoginDlg. Drop this component on the
form and connect the TuilSecurityManager and call its Execute method. To logout, call
TuilSecurityManager.Logout. After login / logout, the policies set should be in effect.
10