I wanted to ask how do most people approach this:
I have several staff that act as admins and have control of products,
customers, etc... I also have customers that can log in and change
their details, password, view previous orders, make new orders, etc...
Furthermore, each customer is assigned a discount level.
Now, I wanted to ask, would you normally separate them into two
separate objects (and two separate tables) or would you use just one
object 'Users' with a boolean defining whether they are admin or not?
Also, if Admins and Customers approach was selected, how would you
suggest implementing login?
Just trying to plan my application and how I should tackle this.
I wanted to ask how do most people approach this:
I have several staff that act as admins and have control of products,
customers, etc... I also have customers that can log in and change
their details, password, view previous orders, make new orders, etc...
Furthermore, each customer is assigned a discount level.
Now, I wanted to ask, would you normally separate them into two
separate objects (and two separate tables) or would you use just one
object 'Users' with a boolean defining whether they are admin or not?
Also, if Admins and Customers approach was selected, how would you
suggest implementing login?
Just trying to plan my application and how I should tackle this.
I think that you might find it profitable to read up on Authorization
and Rails. You can start with these if google does not help:
I wanted to ask how do most people approach this:
I have several staff that act as admins and have control of products,
customers, etc... I also have customers that can log in and change
their details, password, view previous orders, make new orders, etc...
Furthermore, each customer is assigned a discount level.
Now, I wanted to ask, would you normally separate them into two
separate objects (and two separate tables) or would you use just one
object 'Users' with a boolean defining whether they are admin or not?
Also, if Admins and Customers approach was selected, how would you
suggest implementing login?
Just trying to plan my application and how I should tackle this.
Cheers,
Elle
A boolean can be a limit , use an integer so later you can define
something in the middle (like a tutor , helpdesk user, helpdesk manager,
partner )
If you need some more flexible you can use 3 table ,
User , Group and Role