We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,439 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

User Roles.

how to assign roles to users in Database ?
mean i have admin, applicant ? so how could i differentiate bw them ?
HELP !!!

4
Contributors
11
Replies
2 Weeks
Discussion Span
9 Months Ago
Last Updated
16
Views
Question
Answered
akkbkht
Junior Poster in Training
93 posts since Nov 2011
Reputation Points: 24
Solved Threads: 0
Skill Endorsements: 0

First, what is the database platform? MSSQL, MySQL, etc?

JorgeM
Industrious Poster
4,173 posts since Dec 2011
Reputation Points: 297
Solved Threads: 569
Skill Endorsements: 119

its MSSQL platform.

akkbkht
Junior Poster in Training
93 posts since Nov 2011
Reputation Points: 24
Solved Threads: 0
Skill Endorsements: 0

I am still not clear on what you are asking but have you taken a look at some of the information on Microsoft MSDN?

Database Level Roles:
http://msdn.microsoft.com/en-us/library/ms189121.aspx

Create a Login:
http://msdn.microsoft.com/en-us/library/aa337562.aspx

JorgeM
Industrious Poster
4,173 posts since Dec 2011
Reputation Points: 297
Solved Threads: 569
Skill Endorsements: 119

Hello akkbkht,

From what i understand, you can do this by having, for example, a MEMBER_ROLE table e.g

roleID | roleName | Description
  1      Admin      Administrator
  2      Applicant  bla bla bla

and ofcourse, you have a member table..

memberID | firstName | lastName | roleID(fk)
 1         Beautiful    You         2
 2         akkbkht      Daniweber   1

Then you could write your queries to suit this...e.g
check this member with memberid 2, is he an admin? if yes, allow access somewhere, else, deny.
Hope this helps you.

Regards,
Seslie

seslie
Junior Poster
105 posts since Mar 2010
Reputation Points: 66
Solved Threads: 10
Skill Endorsements: 0

ahaaan !!! Thanks alot dear users !!! its clear to me now !!!
@Seslie

HunainHafeez
Posting Whiz in Training
256 posts since Aug 2012
Reputation Points: -3
Solved Threads: 4
Skill Endorsements: 0

one more thing , on front end i have two SignUps, 1 for applicant and one for sub-Admin of different hotels !!!
store procedure will directly assign ID=1 (Role) for applicant but what i should do for admin ? mean he/she would have to wait for that (mean role have to be assigned by Su?per Admin) ? or what ?

HunainHafeez
Posting Whiz in Training
256 posts since Aug 2012
Reputation Points: -3
Solved Threads: 4
Skill Endorsements: 0

one more thing , on front end i have two SignUps, 1 for applicant and one for sub-Admin of different hotels !!!
store procedure will directly assign ID=1 (Role) for applicant but what i should do for admin ? mean he/she would have to wait for that (mean role have to be assigned by Su?per Admin) ? or what ?

HunainHafeez
Posting Whiz in Training
256 posts since Aug 2012
Reputation Points: -3
Solved Threads: 4
Skill Endorsements: 0

@Hunain I think u got your answer now....

akkbkht
Junior Poster in Training
93 posts since Nov 2011
Reputation Points: 24
Solved Threads: 0
Skill Endorsements: 0

@seslie. Thanks alot. That's it. You have solved my issue. Once again thanks a lot for all your help.

akkbkht
Junior Poster in Training
93 posts since Nov 2011
Reputation Points: 24
Solved Threads: 0
Skill Endorsements: 0
Question Answered as of 9 Months Ago by HunainHafeez, JorgeM and seslie

Glad I could help. You're very welcome.

seslie
Junior Poster
105 posts since Mar 2010
Reputation Points: 66
Solved Threads: 10
Skill Endorsements: 0

@akkbkht : yes aamir i got it !!!

HunainHafeez
Posting Whiz in Training
256 posts since Aug 2012
Reputation Points: -3
Solved Threads: 4
Skill Endorsements: 0

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.3194 seconds using 2.71MB