473,805 Members | 2,268 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1516
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 (autoincrementi ng primary key) - an individual User ID for each
user on your system
GroupID (one-to-many relationship from tblGroups.Group ID) - 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 (autoincrementi ng 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 (autoincrementi ng 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.Group ID) - the ID of the
group the permission is for
FolderID (one-to-many relationship from tblFolders.Fold erID) - 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*******@devd ex.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
3062
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 write some PHP code which should, I think, be able to to auto create the tables. The SQL looks like this:
16
2326
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 practice with under Windows is rebooting it. My app contains three different programs (say alice.py, bob.py, and carol.py) that need to be independently launchable, and a dozen or so other .py files that get imported into those first three. What...
3
1656
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 the system into thinking the map is actually a local SCSII drive. That's drive X:. This server is used only for SQL, and contains an OLTP database that sees a lot of use and is pretty heavily indexed. I am toying with the idea of centralizing...
2
5072
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 (Each running 2000) logging in each day. Four of these terminals access the server via Citrix. Currently the database is about 60MB, but it grows to 150 and larger each week. I am constantly having to compact it to keep it running smoothly. ...
1
953
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). What I would like to do is cache the toolbar while the user is in a current section, and only load it again when they change sections. Or , if I could somehow cache all three on the initial page load and then programatically load the desired one...
9
1841
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 ASP.Net website. My website is running the normal IUSR account. And users must login to the website, which uses Forms Authentication. I do not want to give users access directly to tables, so have created
2
2215
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 VB.net Setup program install the database onto this server? Executing a massive SQL Script I guess would work, or perhaps just restoring a backup of the database would work as well.
3
2619
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 node of Enterprise Manager. However, I could not setup a database connection to Server from Client using Server Explorer of Visual Studio 2005. The detail is in the following. Configuration of server and client: Server: Windows Server 2000, SQL...
0
2904
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 the staging database gets the changes performed and then once we're satisfied with how it looks, we push the changes through SQL queries which perform the (deletions, updating, and inserting of articles) onto the production database by comparing it to...
0
9596
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10369
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10109
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7649
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5544
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3008
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.