Role Based Login


I researched a lot but didn’t find any thing relevant to my requirement.

“Basically I had single login page for 6 different roles based on login type some features are enabled and disabled for that role.”

so for this I have an simple API for login with username & password. when your login is success in the response we will be getting the type of role and their permissions.

Example:- Roles -> super admin, admin, manager, hr, receptionist, staff

Ref JSON response for if manager had login
user_id : 1,
type : manager,
home_page : true,
about_page : false,
contact_page : true,
feed_page : true

Ref JSON response for if staff had login
user_id : 3,
type : staff,
home_page : true,
about_page : true,
contact_page : false,
feed_page : false

so based on this response in the header section these menu options will be enabled and disabled by checking the response as true and false. You can use a static data for the API.

I hope i explained clearly. If any questions please comment below.

So can someone please help me with this requirement, no need to use bootstrap also just basic output is enough.

Thanks in advance for your help

So what do you want in response from asking this question? What do you mean by thing relevant to your requirement?

What sort of output did you want to see?