473,569 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How limit records returned by SQL Query based upon user group/class

Bob
I am developing an ASP.NET application that needs to archive documents and
support the retrieval of them. When the document is stored, the user needs
to be able to indicate whether it is a public document or limited to a
group/class of users. Search/retrieval must only return the result set that
the current user is permitted to see.

What is the best mechanism (assuming IIS and SQL Server with Windows
Authentication setup) for supporting returning a subset of records based
upon the class of user performing the query/search?

Ideally the user would have a single sign-on using their Active Directory
domain/userid and this information would be available to include in the SQL
WHERE clause in some fashion.

Thanks,
Bob

Aug 12 '06 #1
2 1551

Użytkownik "Bob" <_N************ **@gmail.comnap isał w wiadomo¶ci
news:ba******** *************** *******@comcast .com...
>I am developing an ASP.NET application that needs to archive documents and
support the retrieval of them. When the document is stored, the user needs
to be able to indicate whether it is a public document or limited to a
group/class of users. Search/retrieval must only return the result set that
the current user is permitted to see.

What is the best mechanism (assuming IIS and SQL Server with Windows
Authentication setup) for supporting returning a subset of records based
upon the class of user performing the query/search?

Ideally the user would have a single sign-on using their Active Directory
domain/userid and this information would be available to include in the
SQL WHERE clause in some fashion.
Consider using system_user() function to determine name of user who is
already
executing the query.
--
JS
BRE Bank Dev Team, Poland
Aug 13 '06 #2
Bob
Jacek:

Thanks for the response, but not sure how that helps.

Is the ASP.NET application running with a network id associated with a
service or the current browser user?

How does using system_user() assist in determining what roles the current
user is a member of?

How would you use system_user() in a join to determine group membership?

Thanks,
Bob

"Jacek" <js******@gazet a.plwrote in message
news:eb******** **@inews.gazeta .pl...
>
Użytkownik "Bob" <_N************ **@gmail.comnap isał w wiadomo¶ci
news:ba******** *************** *******@comcast .com...
>>I am developing an ASP.NET application that needs to archive documents and
support the retrieval of them. When the document is stored, the user needs
to be able to indicate whether it is a public document or limited to a
group/class of users. Search/retrieval must only return the result set
that the current user is permitted to see.

What is the best mechanism (assuming IIS and SQL Server with Windows
Authenticati on setup) for supporting returning a subset of records based
upon the class of user performing the query/search?

Ideally the user would have a single sign-on using their Active Directory
domain/userid and this information would be available to include in the
SQL WHERE clause in some fashion.

Consider using system_user() function to determine name of user who is
already
executing the query.
--
JS
BRE Bank Dev Team, Poland

Aug 13 '06 #3

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

Similar topics

3
2165
by: Micromanaged | last post by:
Is it possible (and if so, how?) to have an asp form page that based upon a user's selection on a field, would generate a input field b that the user selects? For example: User selects "name" in a select statement which would list the possible names to select from or if the user selects "telephone" in the same select statement then it...
5
2438
by: Jim Cobban | last post by:
I am trying to create a web page in which the contents of one selection list depends upon which element in another selection list is chosen, but where the information to populate the first selection list comves from an SQL database on the web server. There are a couple of these situations in my application but, for example, the first list...
1
2106
by: Tom Keane | last post by:
I pretty much want to know how to get the number of records returned from a query, so I can divide that number into another number and place it as another field in the query result. Is this possible? Thanks, Tom Keane
3
6634
by: deko | last post by:
Is there any way to limit the number of records loaded into a ListBox? I looked at qdf.MaxRecords (to apply to the query that is the RowSource of the ListBox) but that only applies to ODBC data sources. I also looked at Tools > Options > Edit/Find and tried setting the "Don't display lists where more than this number of records read:"...
2
19456
by: espositozero | last post by:
Hello... I'm REALLY new to this whole thing, so if you all don't mind speaking in lamens terms for me... What I want to do seems like it should be simple, but I've been searching everywhere and I can't come up with anything. Here's the deal. I have 4 categories in a table, one of which is "products" where there are multiple entries, I want...
7
1526
by: nemo | last post by:
Try to explain this as simple as I can - User provides a list (names, ID's, or ....) into a text box on a GUI application... Based on which options they select I have to look up the corresponding values from our sql databases. For example:
0
880
by: Cowmix | last post by:
Does anyone know if there is a Phoenix (Arizona) based Python User Group? If not, is there any interest out there to start one? Personally, I'm motivated to help out with it.. If you are interest too (or know of an existing group I might of over- looked) email mmarch at gmail dot com. thanks!
9
4165
by: d4zza | last post by:
I'm using Access 97 SR-2 on Windows XP to develop an Inventory style database that has some functionality, but having a problem making my query dynamic. I have a switchboard style form which I choose from a selection of 3 command buttons to select a Due Date for record reviews, choices being 30 days, 60 days, and 120 days. When I click on one of...
1
3275
by: Karen D | last post by:
Help Again!! I’m using Access 2003 and I have a form that allows users to enter criteria for selecting tables and queries as well as the query parameters that will be used to generate a report. The report includes some minor but essential statistical information in its summary. One of the parameters I need to allow the user to provide is the...
0
7609
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...
0
7921
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. ...
0
8118
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...
1
7666
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6278
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5217
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...
0
3651
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...
0
936
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...

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.