473,738 Members | 10,068 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Fine-grained access control

dw
Hello. I've got my LDAP authentication working, and have authorization
working to a great extent as well: I'm limiting who can access the site by
using <allow users="smithj, harrisb, ...."> in the Web.config file.

Is it possible to use this file to also determine who can write to a
particular page and only read from another? The scenario I'm thinking of is
this:

User Page Permission
--------------------------------------------
smithj search.aspx Admin
smithj reports.aspx Read_Only
harrisb search.aspx None
harrisb reports.aspx Admin
........

Can this be accomplished using the User.IsInRole technique or will it
require custom role-management against a SQL database?
Is it possible to make it even more fine-grained, so that a person may have
permission to only view/edit a part of a page? Thanks.
Nov 19 '05 #1
2 1400
You can do it one of several ways:

1. Use <location> in your web.config to define who sees what.
2. Use <location> and group your pages into their own folders. This way you
will have less of <location> elements to declare.
3. You could do a IsInRole() on each page.

Options 1 and 2 are elegant... option 3 will work, but now you have to check
roles on each page.

--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"dw" <co************ ***@uncw.edu> wrote in message
news:es******** ******@TK2MSFTN GP09.phx.gbl...
Hello. I've got my LDAP authentication working, and have authorization
working to a great extent as well: I'm limiting who can access the site by
using <allow users="smithj, harrisb, ...."> in the Web.config file.

Is it possible to use this file to also determine who can write to a
particular page and only read from another? The scenario I'm thinking of
is this:

User Page Permission
--------------------------------------------
smithj search.aspx Admin
smithj reports.aspx Read_Only
harrisb search.aspx None
harrisb reports.aspx Admin
.......

Can this be accomplished using the User.IsInRole technique or will it
require custom role-management against a SQL database?
Is it possible to make it even more fine-grained, so that a person may
have permission to only view/edit a part of a page? Thanks.

Nov 19 '05 #2
dw
Thanks, Manohar. Great idea. Can you point me to some examples of how to do
this? I've been finding results on Google, but wondered if you know of a
good one. Thanks.

"Manohar Kamath" <mk*****@REMOVE THISkamath.com> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
You can do it one of several ways:

1. Use <location> in your web.config to define who sees what.
2. Use <location> and group your pages into their own folders. This way
you will have less of <location> elements to declare.
3. You could do a IsInRole() on each page.

Options 1 and 2 are elegant... option 3 will work, but now you have to
check roles on each page.

--
Manohar Kamath
Editor, .netBooks
www.dotnetbooks.com
"dw" <co************ ***@uncw.edu> wrote in message
news:es******** ******@TK2MSFTN GP09.phx.gbl...
Hello. I've got my LDAP authentication working, and have authorization
working to a great extent as well: I'm limiting who can access the site
by using <allow users="smithj, harrisb, ...."> in the Web.config file.

Is it possible to use this file to also determine who can write to a
particular page and only read from another? The scenario I'm thinking of
is this:

User Page Permission
--------------------------------------------
smithj search.aspx Admin
smithj reports.aspx Read_Only
harrisb search.aspx None
harrisb reports.aspx Admin
.......

Can this be accomplished using the User.IsInRole technique or will it
require custom role-management against a SQL database?
Is it possible to make it even more fine-grained, so that a person may
have permission to only view/edit a part of a page? Thanks.


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2038
by: jerrygarciuh | last post by:
Hello everyone, Wondering if anyone else has had problems with gifs created by php or if anyone sees a problem with this code. Symptom: created jpegs work fine and created gifs work fine in Netscape and
2
2984
by: Eric Woudenberg | last post by:
I just installed a Python 2.3.4 Windows binary on a friend's WinXP machine (because the latest Cygwin-provided Python 2.3 build leaves out the winsound module for some reason). When I try and run this newly installed Python from bash it just hangs (no version message, no prompt, CPU is idle). When I run it from IDLE, or the DOS CMD prompt, it runs fine. Also, Python scripts using the new version run fine, even invoked on the bash command...
9
3331
by: Larry Woods | last post by:
I have a site that works fine for days, then suddenly, I start getting ASP 0115 errors with an indication that session variables IN SEPARATE SESSIONS have disappeared! First, for background information, I have a customized 500-100 page that sends the value of various session variables via email to my support site. The situation: On the home page of the site, the FIRST THING that is done is a Session
8
2349
by: Rick Hawkes | last post by:
Has anyone seen these symptoms? Running IIS 4.0 on NT 4.0. Service packed and updated to the max. Reboot system and everything works fine. After some undetermined period of time (between 10 and 36 hours) asp pages stop working and just hang. Normal HTML pages work just fine.
1
2334
by: Adrian Manic | last post by:
H We have a strange problem which I can not get my head around The entry point of the application is a file called home.asp. First it includes some files that define constants, then is resets / creates a Cookie called PROCAT and then outputs a basic HTML page. The Body tag has an OnLoad event that gets called on the Client Side which does some processing and then loads the main page. The application uses COM components and SQL Server but...
56
3600
by: john bailo | last post by:
I just installed mono from ximian on my redHat 9 workstation and wrote a simple program from the interesting book ado.net in c# by Mahesh Chand. mono is fun ( is there ado for linux ? why/why not? )
3
1893
by: Larry R Harrison Jr | last post by:
I designed this webpage: http://www.dbases.net/photography_pages/new_style_frames_index.html It has horizontal hover/pop-down menus; it works fine on the given machine run off the hard drive, but NOT off the Internet. However, on another machine in my house, it runs fine on the Internet, period--no problems. One of those machines it runs flawlessly on is the computer I designed it on; it also ran fine on a 3rd machine which is was NOT
6
1345
by: shror | last post by:
I need your help please in an aspx webpage. I have 2 combo boxes in the page The first combo load and when i select item from it then the other combo should be loaded then and this cenario work fine in Fire Fox but on Internet Explorer when i select the item from the first combo it doesn't load the second combo but it gives the yellow error mark in the statusbar <error in page> and the says error:
0
1190
by: service0073 | last post by:
Designs For Fine Jewelry Pieces Fine jewelry is created from the finest precious metals and the gems that are set in these metals could be what makes the jewelry so fine. Jewelry lovers can wear precious gems like sapphire, emeralds, diamonds, rubies, and birthstone gems in a variety of ways, but no matter what the designs are, the wearer will know that quality of workmanship is what makes wearing the fine jewelry so special....
0
8788
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9476
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6053
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.