4 Replies - 888 Views - Last Post: 27 April 2011 - 08:36 PM Rate Topic: -----

#1 iamcenz  Icon User is offline

  • You wish you were my hand!
  • member icon

Reputation: 7
  • View blog
  • Posts: 2,442
  • Joined: 26-March 01

User level permissions

Posted 27 April 2011 - 08:10 PM

In this project I am working on there is going to be 4 user levels. Listener, Listener Premium, Artist and Artist Premium. What is the best way of going about implementing this? I was thinking of adding an extra table in the table where the user info is held called permission and set it as a INT(1) and making it so Listeners are 0, Listener Prem is 2, Artist is 3 and Artist Prem is 4. Then run a check ont he page for permissions. Or is there a better way of going about this?

Is This A Good Question/Topic? 0
  • +

Replies To: User level permissions

#2 sas1ni69  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 85
  • View blog
  • Posts: 431
  • Joined: 04-December 08

Re: User level permissions

Posted 27 April 2011 - 08:24 PM

I would think that is a good enough approach.
Was This Post Helpful? 0
  • +
  • -

#3 creativecoding  Icon User is offline

  • Hash != Encryption
  • member icon


Reputation: 922
  • View blog
  • Posts: 3,195
  • Joined: 19-January 10

Re: User level permissions

Posted 27 April 2011 - 08:27 PM

"extra table in the table"

Do you mean column? That would be the best and easiest approach.
Was This Post Helpful? 0
  • +
  • -

#4 sas1ni69  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 85
  • View blog
  • Posts: 431
  • Joined: 04-December 08

Re: User level permissions

Posted 27 April 2011 - 08:29 PM

Lol you know exactly what he meant.
Was This Post Helpful? 0
  • +
  • -

#5 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10188
  • View blog
  • Posts: 37,629
  • Joined: 27-December 08

Re: User level permissions

Posted 27 April 2011 - 08:36 PM

If you're making a table, then it would have to be separate. I think the table approach is a good idea. That way, you can add additional permissions later. And add to the users table a user_permissions column with an FK to the permissions table.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1