Menu items according to user role

pts.
Tags:
Development
HTML
Java
JavaScript
JSP
PHP
Web development
XML
hi, i have to develop a web page which is having a menu with 2 levels of hierarchie. the menu items which should be seen to any user should be according to user's role for eg. a general user should get x,y,z menu items, a superuser should get all etc.the identification of role should be on server after the user enters his user name,passwd. any help ???

Answer Wiki

Thanks. We'll let you know when a new response is added.

Use Hide when functionality on the menu elements; i.e.:
@IsNotMember(“[Administrator]”;@UserRoles)

It’s as easy as that!

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Redrose
    thanks,but will you please exlain it?
    0 pointsBadges:
    report
  • Redrose
    thanks,but will you please explain it?
    0 pointsBadges:
    report
  • Ottercat
    Well, what sort of server-side technology are you using? That makes a big difference as to *how* you'd go about doing it, but from a high level it's the same. Basically, when you're rendering the menu, check to see which role the user belongs to -- I'd suggest having a database table which links users to roles (if they can have multiple roles) or a column in the user table if they are limited to a single role. good luck!
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following