473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Check for Admin of app

Ok,

I authenticate a person against Active Directory using
DirectoryServices, create a AuthTicket and place it in a cookie, with
the value of the cookie being their group membership in
ActiveDirectory.

What would be the best/logical/safest place to put code that actually
checks the groups membership from the cookie and then returns a bool
indicating if they are an admin or not. I have a UI layer, Business
Layer and Data Layer. I would have placed the code in my 'User' class
that handles all processing/adding of users but forms authentication is
not available in this layer because it is a class library.

Would the best place be global.asax, I can see myself checking if they
are an admin before any potentially damaging action
(adding/editing/deleting) other users information is performed so
non-admins can't perform admin tasks.

is there a tutorial or examples someone can point me to explaining
proper evaulating of admins/non-admins. I don't feel like my code is as
secure as it could be.

thank you

Sean

Nov 17 '05 #1
0 1056

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

Similar topics

3
by: Melanie Bergeron | last post by:
Hi all! I want to know what's better between these 2 solutions : CREATE TABLE user ( .... user_type text CHECK(user_type='Root' OR user_type = 'Admin' OR user_type = 'Standard')); ...
1
by: Helixpoint | last post by:
I upload a file with the following code. Is there a way to check to see if the file is currently there before I upload? Dim s1 As String Dim s2 As String Dim pos As Integer s1 =...
1
by: mcasaurabhsumit | last post by:
Deletion in DataGrid using Bubbled Event: lblMsg Delete empid empname sal address usertype 13 naresh 7000 ratna giri admin 6 pawan 7000 munirka user 7 sanjeev 8000 munirka super user ...
0
by: Olegus | last post by:
Not sure this is right group to post my question. What is the best way to check that current logged in user has local admin/domain admin rights on a computer? My application needs to be ran under...
10
by: aniltc | last post by:
I have a list of users(signed for a newsletter).I'm retrieving the list from a database when the admin clicks on a button. There are maximum 10 users diplayed per page.For example,if I had 30 users...
1
nirmalsingh
by: nirmalsingh | last post by:
hai all, in a table user master i have username:Admin , password:admin and userid:1 i have to retrieve user id where username='Admin' and password:'admin' if i enter username='admin' and...
0
by: Big Charles | last post by:
Hello, Programming in VS2003-ASP.NET 1.1, I have this problem: Using DirectoryEntry and without any admin user, how can I check if a domain account, that try to login, has expired? Scenario: User...
4
by: David C | last post by:
Is there a way to check to see if the browser accepts cookies? I have the following line of code that is giving an error "Object reference not set to an instance of an object." with the following...
4
by: ssmeshack85 | last post by:
Hai there, Check whether I configure it correctly... myMsg.To.Add("some1@hotmail.com"); myMsg.From = new MailAddress("admin@emailserver.com"); smtp.Host = "mail.emailserver.com";...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...

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.