c# - How to provide delete authorization to certain user profiles ASP.NET -


i want give permission user profiles (i.e. administrators, managers have in db) delete records in db if press delete button in asp.net web application page. can me on this? or provide me useful resources.

there many options handle user roles. 1 of them forms authentication. makes role management easy , won't have spend time on once set up. more info here.

if wanted set own role management system, add column users table called role , set visibility of controls based on value of role.

if me, add class called currentuser having properties users table (including role). insert(), update(), , delete() methods might this:

if (currentuser.role == "admin" || currentuser.role == "manager") {     // allow insert, update, or delete process } 

Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -