The ampleShop™ Administrator Permission Levels establishes hierarchical access to the administrator console. This way, the Top Level Administrator can create Custom Administrator Roles and assign dynamic access privileges to each of them.
While developing this features we used the infrastructure that was already available in the database model and application code, created at the very early stages of ampleShop development in order to reserve the table and column and variable names for this purpose.
Each section of the website has a fixed ID number assigned to it. The Top Level administrator has access to the Manage Permission Levels form. This form allows the creation of the Custom Administrator Roles. Permissions are created by simply checking or unchecking the site IDs beside each Role.
When a new administrator is created, the Administrator_RecordEdit.cfm form displays a drop down select box. The new administrator's level is selected from the drop-down and access is dynamically established.
When the user is logged in, the SESSION.Administrator.PermissionLevel variable is created and populated with a delimited list of section ID's. Each restricted page in the administrator area includes permissions check based on the section ID. For example, section 11 would include the following:
<cfinvoke method="CheckPermission" ThisSector="11">
If the section ID is not found in the SESSION.Administrator.PermissionLevel, access to the page is denied and a warning message is displayed.
The following a list of the sectors and their corresponding sector ID's
The following files will be affected with this change:
| File name | Description |
| Components/private/.cfm | Set https://www.sandbox.paypal.com/cgi-bin/webscr as a test URL. |
Database changes
Added column StsAdminActivity.Activity text null
Altered column StsAdminActivity.PageName from varchar to text null
Bug Update 5
2/23/2006 PayFlowPro bug
Notes: If the Credit Card expire month is less then two digits long PayFlow rpo throws an error.
FIX: Instead of modifying the code drop down select for month expire added conditional statement that checks for the length of the arguments.CreditExpM. If less then 2 it adds a zero to it.
The affected file is components/private/PayFlowPro.cfm line 97-103
Improvement 3
2/23/2006 Minor database changes
Notes: