|
| Permissions for certain aspects of an ASP.NET web based system. |
 |
Tue, 1 Apr 2008 19:49:31 +0000 |
Hi there, let me begin by saying I am not looking for a full fleged solution
(although don't let that put you off ) for this problem - rather, an example of
it working.
I work at a University and have built a system for the faculty. This system has
a login page that uses LDAP credentials. Once they are logged in, the system
determines whether or not they have administration rights and shows them the
right selections from the master template accordingly (i.e menu.) See below for
an excerpt.
<div id="Navigation">
<h1><%= Application["SiteName"] %></h1>
<ul>
<% if (bAdmin) { %>
<li><a href='<%= ResolveUrl("~/admin/Admins.aspx")
%>'>Administrators</a></li>
<li><a href='<%= ResolveUrl("~/admin/Companies.aspx")
%>'>Standards</a></li>
<li><a href='<%= ResolveUrl("~/admin/Courses.aspx")
%>'>Courses</a></li>
<li><a href='<%= ResolveUrl("~/#")
%>'>Settings</a></li>
<li><a href='<%= ResolveUrl("~/terminology.pdf")
%>' target="_blank">Terminology</a></li>
<li><a href='<%=
ResolveUrl("~/admin/UnRefStandard.aspx") %>'>Unreferenced
Standards</a></li>
<% } else { %>
<li><a href='<%=
ResolveUrl("~/ScopeSequence.aspx?CID=14") %>'>View
Courses</a></li>
<li><a href='<%= ResolveUrl("~/Companies.aspx?CID=1")
%>'>View Standards</a></li>
<li><a href='<%= ResolveUrl("~/Default.aspx")
%>'>Welcome Page</a></li>
<% } %>
<li style="padding-top:7px"><a href='<%=
ResolveUrl("~/login.aspx?action=logout")
%>'>Logout</a></li>
</ul>
</div>
What I'm trying to do:
I want to be able to set up a permissions table that can be dynamically changed
(via Check boxes) that has certain levels of permissions. The user will have an
id associated their username (or no ID at all for students). Depending on which
ID they have next to their login, they will see certain aspects of the site.
Has anyone seen this kind of access policy in action? I am struggling to know
where to start.
Thanks,
Rich
|
| Post Reply
|
|
|
|
|
|
|
|
|
|