"Predicting" authorization?

From: Christopher Zacharias (czacharias@logicalsolutions.net)
Date: 07/23/02


From: "Christopher Zacharias" <czacharias@logicalsolutions.net>
Date: Tue, 23 Jul 2002 06:48:25 -0700


Some findings: Through impersonation, I am able to try
opening a file (using System.IO.File.Open()) and have it
throw an exception if the current user does not have the
necessary access privileges. This is not necessarily the
desired method as I'm sure that there would be poor
performance associated with it. I would much rather just
query the system to see if a file can be accessed by the
selected user without having to open it.

Although performance is not a major issue as this is an
intranet for a mid-size company, various pages may already
be relatively slow given the amount of data they will
display.

- Chris Zacharias

>-----Original Message-----
>Hello all,
>
>My situation is this: I am currently working with a team
>to re-architect our company's intranet in .NET. We've
>decided that our current intranet's custom-built
>authentication and authorization scheme is really
>irrelevant and we could benefit greatly from integrated
>Windows authentication.
>
>We have not made any final decisions on which
>authorization mode we would like to use (File or URL).
>However, I do not know if it really matters to my
question.
>
>My question is: Is it possible to determine, at runtime,
>whether a user will be able to access a file before they
>actually access the file? For example, we would like to
>design our system such that users with restricted access
>are not presented with links that lead to Access Denied
>pages.
>
>Furthermore, say a user gets promoted to a point where
>they would need additional functionality in the system.
>We would like to be able to add that user to the NT group
>representing the role of their new position and suddenly,
>the intranet has the necessary functionality they need.
>
>Any thoughts?
>
>Christopher Zacharias
>czacharias@logicalsolutions.net
>Senior Web Application Developer
>LogicalSolutions.net
>.
>