hey.. there are something confusing me....
i have to set up from Login... if the user pass in , the system will define what type of user is. exp : User have 2 type Admin , Operator.
Then the Admin can full access the database... its means Admin can edit and modified it..
but the Operator only can view the database , and change their password only...
so what should i have?? im new in this programming areas.. so need help..
Limit the user Accesstry to control the user access
Page 1 of 1
6 Replies - 3422 Views - Last Post: 20 October 2008 - 12:37 AM
Replies To: Limit the user Access
#2
Re: Limit the user Access
Posted 17 October 2008 - 01:13 AM
i would say that you would have to set the access level somehow, either stored in a database or as a variable and then set the system actions to check if that user level meets the requirements. eg if the user clicks on a button the code behind the button will check the users access level and choose a path of execution from there.
but theres probably a more elegant way to do it that i don't know of yet
but theres probably a more elegant way to do it that i don't know of yet
This post has been edited by Damage: 17 October 2008 - 01:15 AM
#3
Re: Limit the user Access
Posted 17 October 2008 - 01:25 AM
Damage, on 17 Oct, 2008 - 01:13 AM, said:
i would say that you would have to set the access level somehow, either stored in a database or as a variable and then set the system actions to check if that user level meets the requirements. eg if the user clicks on a button the code behind the button will check the users access level and choose a path of execution from there.
but theres probably a more elegant way to do it that i don't know of yet
but theres probably a more elegant way to do it that i don't know of yet
ok.. i get it ... i have set the access level from the database.... but i need to have disable the button if the user is operator... in this case i would like to have a form that can be able to change the button to enable when the admin use it....
#4
Re: Limit the user Access
Posted 17 October 2008 - 01:33 AM
i would do this,
have two methods for setting up the form
on form load retrieve the current access level from the db and check it. Depending on level(ie level 1 or level 2) run the corresponding method
so method1 would set the form up for admin users( all buttons visible and enabled)
or method2 would do the same but for normal users(only some buttons visible and enabled)
have two methods for setting up the form
on form load retrieve the current access level from the db and check it. Depending on level(ie level 1 or level 2) run the corresponding method
so method1 would set the form up for admin users( all buttons visible and enabled)
or method2 would do the same but for normal users(only some buttons visible and enabled)
#5
Re: Limit the user Access
Posted 17 October 2008 - 01:44 AM
#6
Re: Limit the user Access
Posted 17 October 2008 - 03:13 AM
yup same form, just some controls can be accessed others can't
#7
Re: Limit the user Access
Posted 20 October 2008 - 12:37 AM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|