Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Role based security

Reply
Thread Tools

Role based security

 
 
mrajanikrishna@gmail.com
Guest
Posts: n/a
 
      05-04-2008
Hi friends,

I am developing an application. Most of the pages include a form to
insert data, griview to display, selecting a record in gridview to
edit or delete...
But, I have different roles to users of my application. Some users are
allowed to add, edit and delete. Some to add only. Some to add and
edit.

How can I create roles and disable them to perform an action based on
the role. Truly say, button based security.

How can I achieve this.

Thanks in advance
 
Reply With Quote
 
 
 
 
sloan
Guest
Posts: n/a
 
      05-05-2008


You need to look at the
MembershipProvider
and more importantly
the
RoleProvider

btnEdit.Enabled = RoleProvider.IsUserInRole("Admin")


http://msdn.microsoft.com/en-us/libr...serinrole.aspx


My code above will not work until after you have RESEARCHED and implemented
a RoleProvider.

DotNet 2.0 and above has a default one. Google it, there are a billion
articles about it.

But hopefully, this will get you on the right track.





<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi friends,
>
> I am developing an application. Most of the pages include a form to
> insert data, griview to display, selecting a record in gridview to
> edit or delete...
> But, I have different roles to users of my application. Some users are
> allowed to add, edit and delete. Some to add only. Some to add and
> edit.
>
> How can I create roles and disable them to perform an action based on
> the role. Truly say, button based security.
>
> How can I achieve this.
>
> Thanks in advance



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AzMan Role Based Security vs. ASP.NET Role Based Security Kursat ASP .Net Security 1 05-07-2007 01:33 PM
Role Based Security sean ASP .Net 1 05-27-2004 06:51 AM
Custom Role Based Security Boris Condarco ASP .Net 2 11-28-2003 10:44 PM
Role-Based Security: ACLs and Role Hierarchies Liet Kynes ASP .Net 0 11-26-2003 08:08 AM
Role-based security: Access the role of current user Jesper Stocholm ASP .Net 2 08-23-2003 06:59 PM



Advertisments