Display Data by User Group

I have a page that currently displays a list of data pulled from our SQL server. The server has select, insert, update and delete permissions for one Security Group, and just Select for another. The problem I have is that right now, all the users still see the "Add" page, as well as the Update and Delete links on the grid.

 What I don't know how to do is hide links, etc... for a user who belongs to a certain security group. Any insight on this would be great! The ASP pages are using Windows Authenitcation, and passing the individual user's credentials back to the server.

 Any ideas?

0
arrian81
5/7/2007 5:35:19 PM
asp.net.security 27051 articles. 1 followers. Follow

1 Replies
649 Views

Similar Articles

[PageSpeed] 51

Hi

I assume you need an ASP.NET solution from this forum.

To my mind, It's great to hide your Update and Delete links on the grid according to permissions, but that alone is not enough. Instead, Hide the column will be pleasing to the eye.

If(User.IsInRole("Admin"))

{

  this.DataGrid1.Columns[i].Visible = true;

}

 

 


Best Regards
XiaoYong Dai
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
0
XiaoYong
5/9/2007 7:32:26 AM
Reply:

Similar Artilces:

Unable to cast object of type 'WIM2008_Web.App_Code.wim.security.data.User' to type 'WIM2008_Web.App_Code.wim.security.data.User'
I don't know if i post this in the rigth forum but it is related to database call. this is my code: public DataSet CustomerDetails_Select(Int32 ID)    {      DataSet ds = new DataSet();      WIMConnect wimcon = new WIMConnect();      WIMConnection cnnwim = new WIMConnection();      ConvertDataReaderToDataTable DrToDs = new ConvertDataReaderToDataTable();      GridViewHeadersDao gvh = new GridViewHeadersDao();       &nb...

Use Group Security in order to prevent Users seeing Users from another Groups?
Hi all, maybe this matter was asked before, but I did not see it... *sorry* in that case! We have to prevent users being members in a group A (editing bugs in a product A) seeing other users which are memebers in a group B for another product B. Is something like this possible to model with Bugzilla's group security (we are using Bugzilla version 3.4.5)? Or any other Bugzilla build-in mechanism? Any hints are welcome! -Thanks in advance, Frank -- View this message in context: http://old.nabble.com/Use-Group-Security-in-order-to-prevent-Users-seeing-Users-from-anot...

Logged in user displays user specific data from database
Hi there - I am fairly new to ASP.NET and am hoping for some guidance here ... I am building an application for manages to track employees as the employee leaves the business.  Basically there are processes a line manager is required to complete and I want the manager to enter completion dates when those processes have been completed. I have gotten as far as successfully creating the login/membership controls.  The user (line manager) logs in and is then redirected to the correct page and thats fine.  However, I then want for the user to see records from a dat...

Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider)
Hi when i try and open a database in sql server management studio i get the error "Cannot open user default database. Login failed. Login failed for user 'DOMAIN\User'. (.Net SqlClient Data Provider)", what can i do to rectify this, i have googled around and still havent found no answers. Which authentication mode is your Sql Server configured - MixedMode, Windows Authentication or Sql Server Authentication? Please refer to http://msdn2.microsoft.com/en-us/library/ms366351.aspx and http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx    Ple...

display data for a particular logged in user (User.Identity.Name;)
hi, basically i have a database table with: fileNo, fileName, fileSize, fileType, fileOwner etc at the minute my grid view displays ALL files for every fileOwner, how does one filter this to only displaying the files which belong to a particular fileOwner who is logged in.. i.e. SELECT * FROM tblFile       WHERE fileOwner = (User.Identity.Name)         -   to show files for a user who is logged in   how does one do this please?   thanks and regards Hi,jules U can Do like thisI am assuming that ur ...

same user control in two pages, display data from data base same time
I have two pages(.aspx), each of them havesame user control(.ascx) inside. that user control dispaly data from database. after I clickthe first page which displays data on the user control. I click the second page, I want to display same data already in the user control on the second page, thanks for any idea. sorry, i don't quite understand what you are trying to do. are you trying to say that the data should be cached for the usercontrol so it doesnt need to do constant trips to the database, if so: you should have a look at this : http://www.dotnetjunkies.com/quickstart/aspplus/doc/ca...

How do I display data in a datagrid specific to the logged in user using the User ID
Hi, I've got a table that holds user details (such as age, location etc). This table is linked to a user logon details table by the UserID column. How do I get a datagrid to display the logged on users details?  Everything I've read so far uses Username but username isn't a column in my UserDetails table. I've tried SELECT all from the user details table and using UserID as a session parameter but the datagrid doesn't display so I'm doing something very wrong I think. The sql statement looks like this:  SELECT UserID, FirstName, Surname, Telephone, Sect...

Security Groups for a User
I would like to use the system security groups in my implementation of the portal, does anyone know how to access them, I havenot been able to find any information. Cougars Answered my own question WindowsPrincipal wp = new WindowsPrincipal((WindowsIdentity)context.User.Identity); if (wp.IsInRole(@"BUILTIN\Administrators")) i = 1; else i = 2; ...

display users in groups
Hai, I want to know that how to add the users to group and display the users in the groups using LDAP. Plz help me RegardsSomu Check out this article: Accessing Active Directory Through the .NET Framework By Robert Chartier Darrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you! In addition, I would like to point out that there are many, many posts here on how to do such a thing.  Try using the search here - I was able to hit a number of relevant results using 'enumerate groups'Ryan DunnWeblog The BookLDAP Programming Help...

How to update/modify a ADAM user/Group/Application using vb.net or c#.net
 Hi I  need  help for update/modify a ADAM user/Group/Application using vb.net or c#.net RegardsMallikarjunaP.Mallikarjuna Hi,you can take a look at this Microsoft support site: http://search.microsoft.com/search/results.aspx?view=en-us&st=a&na=84&qu=adam+update+group&qp=&qa=&qn=&c=4&s=0Also, when I think about ADAM/Active directory and doing something against this technology I think of LDAP queries, so this becomes: http://www.google.be/search?hl=nl&q=ldap+query+C%23&meta=Grz, Kris.Read my blog. Handy Firefox plugins fo...

Columbia, MD. Advanced .Net User Group Meeting: Enterprise Templates in Visual Studio.Net
Advanced Group Meeting--Tuesday, March 16 Topic: Creating Enterprise Templates in Visual Studio.Net Time: 6:30-9:00 pm Location: Impact Innovations, Columbia MD Microsoft introduced Enterprise Templates in Visual Studio.Net to allow software architects to speed development while enforcing architectural standards and rules across development teams. These templates allow you to dictate application structure, employ component usage constraints, and set default property values. We will discuss the benefits of creating your own Enterprise Template and walk through th...

.Net Framework Code Access Security
I built a c# .Net 2.0 based user control that I run as an ActiveX control in IE7.  It works fine except for code access security issues ("Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, ......' failed).  To get around the code access security issues, I created a code group within the Machine All_Code group with the Publisher membership conditions based on a valid certificate (which my assembly has) and granted that code group the "Everything" permission set.  Even though my code group is m...

Login failed for user 'Bachelorplace'. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)
please tellme how to resolve this error, i m using server studio management tool. and trying to connect using sql server authentication. my pc is over a domain.   Login failed for user 'Bachelorplace'. The user is not associated with a trusted SQL Server connection. (.Net SqlClient Data Provider)  check whether that sql server is allowing sqlauthentication or not.select that server -> right click it-> select  properties  -> in the window, select security -> check what is the server authentication. it should be  sqlserver and windows authentica...

Display data for logged in User only
I try to figure out how to display data which belongs to one individual User only.Once the User logged in, he should see only the data which is related to his UserId. Currently I'm usingSELECT aspnet_Customers.FirstName, aspnet_Customers.LastName, aspnet_Customers.Address, aspnet_Customers.ZipCode, aspnet_Customers.City, aspnet_Customers.Country, aspnet_Customers.CustomerID, aspnet_Customers.UserID, aspnet_Membership.LoweredEmail, aspnet_Membership.LastLoginDate FROM aspnet_Customers INNER JOIN aspnet_Membership ON aspnet_Customers.UserID = aspnet_Membership.UserIdI know there is somethi...

Web resources about - Display Data by User Group - asp.net.security

Samples of display typefaces - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Christmas window display at David Jones' Sydney store upsets shoppers
The David Jones city Christmas window display usually pulls large, excited crowds but this year has only attracted a dribble of frowning and ...

Southwest flight headed to LAX diverted after 3 passengers display suspicious behavior
... flight headed to the Los Angeles International Airport from Indianapolis was diverted to Kansas City Sunday after three passengers displayed ...

Google Display Ad Chief Neal Mohan Is YouTube's New Product Boss
YouTube is getting a new product boss from Google, which is getting a new display advertising boss. And both moves appear designed to strengthen ...

SuperComputing 15: Intel’s Knights Landing / Xeon Phi Silicon on Display
... channels of DDR4, we saw Intel’s reference board on the show floor as a representation on how to do it. A couple of companies had it on display, ...

Sidefari lets iPad owners display two Safari Web pages side-by-side
... what a lot of iPad Air 2, iPad mini 4, and iPad Pro owners have been asking for: it allows users to load up two Safari Web pages, and to display ...

Apple Watch supplier LG Display plans to spend $4.2B on new OLED plant
LG Display is planning to spend up to $4.2 billion on a new factory in Paju, South Korea in order to meet demand for OLED screens some of which ...

2015 Los Angeles Auto Show tech: Augmented reality manuals and retina-display maps
Jonathan Gitlin A view out over part of the cavernous South Hall. 20 more images in gallery LOS ANGELES—The LA Auto Show got underway this ...

Apple has confirmed a major iPad Pro display issue
It wouldn't be an Apple product launch if we couldn't find an issue to nitpick, so you shouldn't be surprised to hear that some iPad Pro owners ...

Plastic, please: Food displays almost good enough to eat - Videos - CBS News
Across Japan, realistic-looking food displays are used by restaurants to demonstrate portion size and to lure customers. The fake food is becoming ...

Resources last updated: 11/24/2015 6:47:33 PM