473,396 Members | 1,975 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,396 software developers and data experts.

Setting application users permissions on specific records.

Hi there,
I am writing a VB.NET 2005 application that connects to an MySQL DB
(it could be MS SQL, one day...). One of the window forms contains a
gridview with some rows coming from a table on the DB, basically,
phisical addresses of contacts. I would like to implement a system to
grant/deny read/write permissions on specific rows, so that if the
user, after the log in, has got the necessay privileges he actually
can see/modify some rows, if he hasn't the rows will not even be shown
to him.

I can't think of an easy way to implement that, considering also that
I would like to set persmissions also at group (of users) level.

Any idea would be appreciated.

Regards,
D.
Jun 27 '08 #1
4 2282
On Apr 23, 3:14 am, nokia33948 <nokia33...@yahoo.itwrote:
Hi there,
I am writing a VB.NET 2005 application that connects to an MySQL DB
(it could be MS SQL, one day...). One of the window forms contains a
gridview with some rows coming from a table on the DB, basically,
phisical addresses of contacts. I would like to implement a system to
grant/deny read/write permissions on specific rows, so that if the
user, after the log in, has got the necessay privileges he actually
can see/modify some rows, if he hasn't the rows will not even be shown
to him.

I can't think of an easy way to implement that, considering also that
I would like to set persmissions also at group (of users) level.

Any idea would be appreciated.

Regards,
D.
I don't know very much about MySql, but if I were using Sql Server, I
would create a View that selected just the rows needed and then set
permissions on the view as appropriate and then deny permissions on
the table itself. The queries would all query the view. I don't know
if MySql supports views or not, but that is the easiest way I know to
do it.

Chris

Jun 27 '08 #2
On 23 Apr, 18:01, Chris Dunaway <dunaw...@gmail.comwrote:
I don't know very much about MySql, but if I were using Sql Server, I
would create a View that selected just the rows needed and then set
permissions on the view as appropriate and then deny permissions on
the table itself. *The queries would all query the view. *I don't know
if MySql supports views or not, but that is the easiest way I know to
do it.

Chris-
Hi Chris,
thank you for your interested: mySQL supports views, almost the same
way as SQL Server; but how could I tell the system that user A can see
row 1 and 3, user B can see all the rows (1,2,3), user C cannot see
any?

Regards,
D.
Jun 27 '08 #3
On Apr 23, 11:41 am, nokia33948 <nokia33...@yahoo.itwrote:
On 23 Apr, 18:01, Chris Dunaway <dunaw...@gmail.comwrote:
I don't know very much about MySql, but if I were using Sql Server, I
would create a View that selected just the rows needed and then set
permissions on the view as appropriate and then deny permissions on
the table itself. The queries would all query the view. I don't know
if MySql supports views or not, but that is the easiest way I know to
do it.
Chris-

Hi Chris,
thank you for your interested: mySQL supports views, almost the same
way as SQL Server; but how could I tell the system that user A can see
row 1 and 3, user B can see all the rows (1,2,3), user C cannot see
any?

Regards,
D.
Create one view that selects rows 1 and 3 and grant user A permission
to query from that view, create another view that selects all the rows
and grant user B permission to query from that view. Deny all users
permissions on the table and force them to query the views only. User
C will not be able to see any because she can't access either of the
views or the table.

Chris
Jun 27 '08 #4
On 23 Apr, 21:28, Chris Dunaway <dunaw...@gmail.comwrote:
Create one view that selects rows 1 and 3 and grant user A permission
to query from that view, create another view that selects all the rows
and grant user B permission to query from that view. *Deny all users
permissions on the table and force them to query the views only. *User
C will not be able to see any because she can't access either of the
views or the table.

Chris- Nascondi testo tra virgolette -

- Mostra testo tra virgolette -
Hi Chris,
as I wrote to Lloyd, I have got been suggested to add a field "Role"
to each row to determine which user can see that row and which one
cannot. Then the stored procedure retrieving the data will filter on
the "Role" field. What do you think?

Regards,
D.
Jun 27 '08 #5

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

Similar topics

0
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting FrontPage extensions 2002 hosted by the company...
2
by: K Finegan | last post by:
I have an archival process on a large database that runs once a month. At the beginning of the process the triggers and indexes on the tables whose data is moved are dropped, the data is moved and...
3
by: James N | last post by:
My ASP.NET application needs read/write permissions for drive "Z:", which is mapped to my Linksys Gigadrive (Network Attached Storage...if anyone is familiar with that). If I configure the...
16
by: Marina | last post by:
Hi, I am trying to find the minimum security settings to allow a windows control embedded in IE have full trust. If I give the entire Intranet zone full trust, this works. However, this is...
7
by: Stephen | last post by:
I have my intranet setup on our web server. It contains multiple applications, but none are set up in the default application pools. In other words, I create a webform and plop it into a...
20
by: Keith G. Murphy | last post by:
I'm trying to get a feel for what most people are doing or consider best practice. Given a mod_perl application talking to a PostgreSQL database on the same host, where different users are...
5
by: isideveloper | last post by:
I'm building a new C# web application that will provide my company some administrative operations that were previously only completed by tweaking the data in the database. 1. Encrypted password...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
5
by: daokfella | last post by:
I have a custom web.config section similar to the following: <CustomAuthSettings attr1="" attr2=""> <Locations RedirectUrl="Invalid.aspx"> <add Path="test.aspx" Roles="1,2,3" Permissions="4,5,6"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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
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...
0
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.