Limit the user Access

try to control the user access

Page 1 of 1

6 Replies - 4588 Views - Last Post: 20 October 2008 - 12:37 AM Rate Topic: -----

#1 aem1354  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 28
  • Joined: 15-October 08

Limit the user Access

Post icon  Posted 17 October 2008 - 01:00 AM

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..

Is This A Good Question/Topic? 0
  • +

Replies To: Limit the user Access

#2 Damage  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 27
  • View blog
  • Posts: 1,079
  • Joined: 05-June 08

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 :P

This post has been edited by Damage: 17 October 2008 - 01:15 AM

Was This Post Helpful? 0
  • +
  • -

#3 aem1354  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 28
  • Joined: 15-October 08

Re: Limit the user Access

Posted 17 October 2008 - 01:25 AM

View PostDamage, 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 :P



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....
Was This Post Helpful? 0
  • +
  • -

#4 Damage  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 27
  • View blog
  • Posts: 1,079
  • Joined: 05-June 08

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)
Was This Post Helpful? 0
  • +
  • -

#5 aem1354  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 28
  • Joined: 15-October 08

Re: Limit the user Access

Posted 17 October 2008 - 01:44 AM

:D tankz.. its still use the same form rite??
Was This Post Helpful? 0
  • +
  • -

#6 Damage  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 27
  • View blog
  • Posts: 1,079
  • Joined: 05-June 08

Re: Limit the user Access

Posted 17 October 2008 - 03:13 AM

yup same form, just some controls can be accessed others can't
Was This Post Helpful? 0
  • +
  • -

#7 aem1354  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 28
  • Joined: 15-October 08

Re: Limit the user Access

Posted 20 October 2008 - 12:37 AM

View PostDamage, on 17 Oct, 2008 - 03:13 AM, said:

yup same form, just some controls can be accessed others can't

tankzz alot...huhu i get it now....
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1