473,388 Members | 876 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,388 software developers and data experts.

Suggestions for database setup

Hi - I want to provide a secure (ASP) based file browser - based on a
parent/child table of files/images etc - stored in a directory on a
server.

I want to be able to have individuals, who belong to groups, to be able
to access various folders - no problem -assign a group to the folder,
and check that that person belongs to one of the groups of the folder
before displaying it.

However, I want to go one further - rather than just 'can view/can't
view' for each individual/group for each folder, I'd like to grant
additional rights to the person to be able to modify/add/delete from
folders - but for those privileges to be set for individual folders, not
for the user as a whole. Similar to the way in which Windows Explorer
secures files and directories.

Can anyone suggest a database schema which could tackle this?

Thanks for any pointers,

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #1
3 1494
I've done something similar (not quite as complex though) with the Admin
section of my site. My solution would rely on the following database
tables:

tblUsers - provides information about the users on your system
UserID (autoincrementing primary key) - an individual User ID for each
user on your system
GroupID (one-to-many relationship from tblGroups.GroupID) - the ID of the
group the user belongs to
Username, password etc... - as neccessary for the rest of the site

tblGroups - provides information about the groups on your system
GroupID (autoincrementing primary key) - an individual Group ID for each
group you create
Group Name etc... - as neccessary for the rest of the site

tblFolders - provides information about the folders on your site
FolderID (autoincrementing primary key) - an individual Folder ID for each
folder on your system
Foldername etc... - as neccessary for the rest of the site

tblPermissions
GroupID (one-to-many relationship from tblGroups.GroupID) - the ID of the
group the permission is for
FolderID (one-to-many relationship from tblFolders.FolderID) - the ID of
the folder the permission is for
Read (Boolean) - if the group has read permission for this folder
Modify (Boolean) - if the group has modify permission for this folder
Add (Boolean) - if the group has add permission for this folder
Delete (Boolean) - if the group has delete permission for this folder

When you add a group, you'd add all neccessary information in tblGroups,
and specify the permissions for each existing folder in the tblFolders
table. If you added a new folder, then I guess you'd set a generic set of
permissions for all existing groups, and then modify them on a case-by-case
basis.

Then as an ASP file included on each page:
Since you'd have the UserID passed to each page as part of the login, you'd
be able to retrieve the ID number of the group they belong to from
tblGroups. You'd also have the ID number of the current folder. You'd then
request the Read, Modify, Add and Delete permissions from tblPermissions,
and set them to boolean variables, which you could then use to evaluate
whether or not the selected action is allowed.

If you wanted, you could also set default permissions in tblFolders. Then,
if there is no entry in tblPermissions, use the default folder permissions.

Hope this helps,
Blair

Mark <an*******@devdex.com> wrote in article
<ez**************@TK2MSFTNGP09.phx.gbl>...
Hi - I want to provide a secure (ASP) based file browser - based on a
parent/child table of files/images etc - stored in a directory on a
server.

I want to be able to have individuals, who belong to groups, to be able
to access various folders - no problem -assign a group to the folder,
and check that that person belongs to one of the groups of the folder
before displaying it.

However, I want to go one further - rather than just 'can view/can't
view' for each individual/group for each folder, I'd like to grant
additional rights to the person to be able to modify/add/delete from
folders - but for those privileges to be set for individual folders, not
for the user as a whole. Similar to the way in which Windows Explorer
secures files and directories.

Can anyone suggest a database schema which could tackle this?

Thanks for any pointers,

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 19 '05 #2
It does Blair - thank you very much,

Mark

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #3
Glad to be of use.
Jul 19 '05 #4

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

Similar topics

5
by: lkrubner | last post by:
I have a webserver through Rackspace. I create a domain. I create an FTP user. I upload some files. I create a database called testOfSetupScript and then I create a database user named setup. I...
16
by: Paul Rubin | last post by:
As what must be penance for something or other, I'm needing to release a Python app for use under Windows XP. Please be gentle with me since I'm a Un*x weenie and the only thing I've had much...
3
by: Alexey Aksyonenko | last post by:
I got a server that has a RAID-5 array partitioned into C: and D: drives (OS Win2K Adv. Server installed on C:). The server also has a mapping to a NAS device using the latest protocols that trick...
2
by: Rosy Moss | last post by:
I am in the process of cleaning up a database that our company uses to track jobs, time and expense, and customer information. We are running Windows 2000 Server with approximately 20 terminals...
1
by: npverni | last post by:
I have a navigation bar user control that is very expensive to create from the database. This toolbar will only change when the user navigates to a different section (there are three in total). ...
9
by: Nemisis | last post by:
Hi everyone, hope your all looking forward to xmas. I am setting up a Sql2005 database on a Windows Server, running Windows Server 2003. The database is going to be accessed via users using an...
2
by: Aussie Rules | last post by:
Hi, I have a vb.net application that uses a SQL Express database. The end user already has SQL Express setup on there server, but they have no skills at using it. Is there a way I can have my...
3
by: =?Utf-8?B?ZGF2aWQ=?= | last post by:
Last week I asked a question about connection to database from client machine (developer machine). I have changed the database security setup for "SQL Server and Windows" under (local)Windows NT...
0
by: imusion | last post by:
Hi, I have 2 servers each running AIX and both have a DB2 database setup on them. I'm building a news management application and in our setup we need to have a staging and production setup. So...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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:
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
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...
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...

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.