This topic is locked

New Users

2/15/2006 1:30:48 AM
ASPRunnerPro General questions
customcode author

Hi, I find I have to recompile the pages everytime I want to add a new user. Is there a work around? Currently the passwords and user names is stored in the myuser table

Sergey Kornilov admin 2/15/2006

Hi,
To avoid pages rebuilding after adding new user please try to add default user group on User Group Permission dialog on Security Tab.
ASPRunner 4.0 offers new way to solve this problem. Please add a new field to your Users table which identifies a permission group of user. Then select this new field in GroupID field dropdownbox on User Group Permission dialog and set permissions for these user groups.

customcode author 2/21/2006

Hi,

To avoid pages rebuilding after adding new user please try to add default user group on User Group Permission dialog on Security Tab.
ASPRunner 4.0 offers new way to solve this problem. Please add a new field to your Users table which identifies a permission group of user. Then select this new field in GroupID field dropdownbox on User Group Permission dialog and set permissions for these user groups.


Hi Sergey, I am still using 3.2 because 4.0 will not open. I have tried the versions you have sent me, but this is still an on going problem. Will the default user work in 3.2?

Sergey Kornilov admin 2/21/2006

Yes, ASPRunner 3.2 supports default user.

customcode author 3/21/2006

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