Yes, ASPRunner 3.2 supports default user.
Hi Sergey, I figured out a way I can add users and set different permissions for each table with out having to recompile. I put this in the login page, and added one 5 char table row in the users tables for each table in the database. Each user can be set with different permissions for each table, which can be changed at anytime without compiling. Is there anyway this option can be added to future versions?
' table asset information permissions
Session("permAssetInfo") = rs("permAssetInfo")
' table customer permissions
Session("permCustomer") = rs("permCustomer")
' table department permissions
Session("permDepartments") = rs("permDepartments")
' table Employee permissions
Session("permEmployee") = rs("permEmployee")
' table Labor Permissions
Session("permLabor") = rs("permLabor")
' table Maintenance Permissions
Session("permMaintenance") = rs("permMaintenance")
' table Mstatus Permissions
Session("permMstatus") = rs("permMstatus")
' table Mydispatch Permissions
Session("permMydispatch") = rs("permMydispatch")
' table Orders Permissions
Session("permOrders") = rs("permOrders")
' table Myfleet Permissions
Session("permMyfleet") = rs("permMyfleet")
' table Employee Permissions
Session("permOrderstatus") = rs("permOrderstatus")
' table Service Permissions
Session("permService") = rs("permService")
' table Status Permissions
Session("permStatus") = rs("permStatus")
' table Tbldomicle Permissions
Session("permTbldomicle") = rs("permTbldomicle")
' table Vendor Permissions
Session("permVendor") = rs("permVendor")
' table Wcstatus Permissions
Session("permWcstatus") = rs("permWcstatus")
' table assetCat Permissions
Session("permassetCat") = rs("permassetCat")
I modified the users pages so I can add and edit the permissions.
I then entered the following characters to control permissions right in the users table
A for Add
E for Edit
D for Delete
S for Show
P for Print
Various combinations for different users.
Some would get all letters for a table AEDSP allowing all permissions
I then added the following into the maintenance_aspfunctions
Function GetUserPermissions(sUserName)
Select Case sUserName
Case "xxxxxxxxxxxxxxxx" ' database admin
GetUserPermissions = Session("permMaintenance")
Case Else
GetUserPermissions = Session("permMaintenance")
End Select
End Function
' everyone gets the same table list but not permissions
Function GetTables(sUserName)
Select Case sUserName
Case "xxxxxxxxxxxxxxxx" ' database admin
GetTables = Array("mydispatch", "mstatus", "tbldomicile", "wcstatus", "departments", "maintenance", "orders", "orderstatus", "service", "vendor", "customer", "employee")
Case Else
GetTables = Array("mydispatch", "mstatus", "tbldomicile", "wcstatus", "departments", "maintenance", "orders", "orderstatus", "service", "vendor", "customer", "employee")
End Select
End Function
I then added the following into the labor_aspfunctions
Function GetUserPermissions(sUserName)
Select Case sUserName
Case "xxxxxxxxxxxxxxxx" ' database admin
GetUserPermissions = Session("permLabor")
Case Else
GetUserPermissions = Session("permLabor")
End Select
End Function
I continued with all other tables_aspfunctions
Hope this Helps