473,513 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

An addition to my userlevel problem.

If any of you happened to read my earlier posts, I had a dilemma with
creating an efficient method of limiting access to data for my users and
subusers.

My heirarchy looks like this:
[Please excuse my shoddy ASCII art ;)]

Admins
|
+- Client 1
| |
| +- Business 1
| | |
| | +- Operator 1
| | |
| | +- Operator ..
| | |
| | +- Operator n
| |
| + Business n
| |
| +- Operators ...
|
+- Client n
|
+- Business n
|
+- Operators ...
What I need to do is find a way to associate data entered with a certain
group so that only that group may perform actions on it.

For example: Operator 1 is associated with Business 1 which, in turn,
is associated with Client 1. If Operator 1 enters in some data, that
data should only be accessible by members of the Business 1 group and
groups above it ( Admin > Client 1 > Business 1 > Operator 1 ). This
would be done in such a way that data is shared 'up' but not 'across'.
Data entered by a member of Business 1 would be accessible by other
members of Business 1 but not by Business 2. Moving up a tier, Client 1
would have access to all his businesses, but not the businesses of other
clients.

There would be a bevy of different clients and businesses so saying,
"Well, make Admins = 1000, each client a multiple of 100, each business
a multiple of 10, and each operator a multiple of 1." The obvious
problem with that would be when there are more than 9 of any client,
business or operator.

So, now I beg of you wise, wise people: How on earth do I construct a
heirarchy and tagging system to do what I described above? I'm certain
something like this has been done before. I am just unaware of how to
set it up.

TIA,
Jay

Jul 17 '05 #1
2 1959
Jay Moore wrote:
If any of you happened to read my earlier posts, I had a dilemma with
creating an efficient method of limiting access to data for my users and
subusers.

My heirarchy looks like this:
[Please excuse my shoddy ASCII art ;)]

Admins
|
+- Client 1
| |
| +- Business 1
| | |
| | +- Operator 1
| | |
| | +- Operator ..
| | |
| | +- Operator n
| |
| + Business n
| |
| +- Operators ...
|
+- Client n
|
+- Business n
|
+- Operators ...
What I need to do is find a way to associate data entered with a certain
group so that only that group may perform actions on it.

For example: Operator 1 is associated with Business 1 which, in turn,
is associated with Client 1. If Operator 1 enters in some data, that
data should only be accessible by members of the Business 1 group and
groups above it ( Admin > Client 1 > Business 1 > Operator 1 ). This
would be done in such a way that data is shared 'up' but not 'across'.
Data entered by a member of Business 1 would be accessible by other
members of Business 1 but not by Business 2. Moving up a tier, Client 1
would have access to all his businesses, but not the businesses of other
clients.

There would be a bevy of different clients and businesses so saying,
"Well, make Admins = 1000, each client a multiple of 100, each business
a multiple of 10, and each operator a multiple of 1." The obvious
problem with that would be when there are more than 9 of any client,
business or operator.

So, now I beg of you wise, wise people: How on earth do I construct a
heirarchy and tagging system to do what I described above? I'm certain
something like this has been done before. I am just unaware of how to
set it up.

TIA,
Jay

Hi Jay,

First, sorry, I didn't catch you followup question. I forgot to mark
that thread as one I was involved in.

To mimic a UFS file permission scheme, you'll need to store your data
with the following information:

User Owner
Group Owner
Permission Set (three octets)

The user owner is a specific user that has the most basic access to any
resource. In most cases, the user owner is allowed to do absolutely
everything to their resources. However, it's sometimes practical to
limit a owner's abilities to manipulate (or destroy) a certain resource.

The group owner is the primary group that "owns" the file. Typically,
this is set to the group to which the owner belongs. This allows you to
create a group-wide permission assignment.

Lastly, the permission set allows you to set the permissions for read,
write, and execute for three levels of users:

1. Users
2. Groups
3. Everyone Else

In your proposed system, I would create a group for each logical group
of users:

-Admins
-Clients
-Businesses
-Operators

Within each group, you're allowed to have as many members as you want.
Additionally, any user can belong to any number of groups (as per UFS
conventions). So, in your DB, you would want to create a linking table
that would link the group table to the user table and allow a
"many-to-many" relationship.

So in your example, I would then create a couple users with these
attributes:

Admin1: Belongs to Admin
Admin2: Belongs to Admin
Client1: Belongs to cl1
Client2: Belongs to cl2
Business1: Belongs to bu1
Business1: Belongs to bu2
Operator1: Belongs to bu1
Operator2: Belongs to bu1
Operator3: Belongs to bu2
Operator4: Belongs to bu2

Admin1 and Admin2 are also members of cl1,cl2,bu1,bu2
Client1 is also a member of bu1
Client2 is also a member of bu2

Then, your resources can have these attributes:

report1 Operator1:bu1 640
report2 Operator2:bu1 640
report3 Operator3:bu2 640
report4 Operator4:bu2 640

Therefore, report1 can be read by anyone belonging to the bu1 group and
changed only by the user Operator1. This means that users Client1,
Business1, Operator1, and Operator2 can all read the report (including
the Admins, of course).

As you can see, the multi-tier hierarchy can be carried out simply by
assigning proper groups (and subgroups). If you need more complex
schemes, just assign more groups including and excluding members as you
need.

As the developer of the project, I would create a "super user" for
myself to use. On UFS schemes, the super user is not restricted by the
permission schemes and can always read and write any file.

Let me know if you need any further help. (You can also email me
directly if your followups start to get into the particulars of your
implementation.)

HTH,
Zac

Jul 17 '05 #2
Jay Moore <ad*****@isp.tld> wrote in message
news:<rx*******************@twister.rdc-kc.rr.com>...

My heirarchy looks like this:

Admins
|
+- Client 1
| | +- Business 1
| | | +- Operator 1
| | | +- Operator ..
| | |
| | +- Operator n
| |
| + Business n
| |
| +- Operators ...
|
+- Client n
|
+- Business n
|
+- Operators ...
What I need to do is find a way to associate data entered with
a certain group so that only that group may perform actions on
it. .... This would be done in such a way that data is shared 'up' but not
'across'. Data entered by a member of Business 1 would be accessible
by other members of Business 1 but not by Business 2. Moving up
a tier, Client 1 would have access to all his businesses, but not
the businesses of other clients.


OK, let's say that each user has a permission string that consists of
numeric (possibly, zero-filled) strings delimited by dashes. The first
such string (required) would denote the client, the second (optional),
business, the last (again, required), the user. Whatever is in-between,
reflects hierarchy and hierarchy alone.

So, if you have a user whose permission string is 0001-0001 (that
would be your client number one), that user would be authorized to
access anything that has permission string 0001-* (that is, everything
that has to do with client number one). If you have a user whose
permission string is 2479-1876-4765-2678-0634 (something like "client
2479, business 1876, business unit 4765, business subunit 2678, employee
ID 0634), that user would be authorized to access anything that has
permission string 2479-4983-4765-2678-*. Needless to say, user with
a permission string of 2479-0001 would be allowed to access anything
that has permission string 2479-*, including, of course things with
permission string 2479-4983-4765-2678-*.

Since this is a string, it allows for indefinitely deep nesting of
levels, and the maximum possible ID number at each level is MAXINT.

I understand this is really awkward, but this is the only solution
I can think of given the variable depth of your problem...

Cheers,
NC
Jul 17 '05 #3

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

Similar topics

2
1216
by: Derek | last post by:
I am having a problem updating the main table (2nd set of code) based on the total of all details entered (1st set of code). It seems to be off by less than a dollar. I thought it was a decimal issue but all my ctypes are set to decimal. I am resetting all my textfields to "" after adding the detail information. Any help would be...
24
2674
by: Alex Vinokur | last post by:
Consider the following statement: n+i, where i = 1 or 0. Is there more fast method for computing n+i than direct computing that sum? -- Alex Vinokur email: alex DOT vinokur AT gmail DOT com http://mathforum.org/library/view/10978.html
1
1715
by: EL1979 | last post by:
HELP!!!!! I am very frustrated and extremely confused. When creating the DB, it was split and userlevel security was enacted. Now, I need to make changes so that the VB code will look in the right location for a file. Essentially, I need to knock one level off of the directory, ie go from ...e\eg\source_file to ...eg\source_file and though...
34
16607
by: Andy | last post by:
Hi, Are 1 through 4 defined behaviors in C? unsigned short i; unsigned long li; /* 32-bit wide */ 1. i = 65535 + 3; 2. i = 1 - 3; 3. li = (unsigned long)0xFFFFFFFF + 3; 4. li = 1 - 3;
0
1241
by: Newbie | last post by:
hi all, i am doing a project which requires me to provide a security login feature. i understand that access has a user level security feature but i could not use it coz i'm tested on my ability to use existing controls. i did the login form, then it occured to me that it would be much more convenient for users to change passwords...
3
2168
by: snow.carriers | last post by:
Let me first state that I'm using Borland Turbo C++, it's relatively old so the new string methods won't work. Anyways, first I'm trying to collect a line of a string (with numbers, letters, dashes) into each variable. For just numbers, it's relatively easy: ifstream fout("s1.in"); for (a=0; a<17; a++) { fout >> data; cout << data <<...
2
1422
by: S. Kitty | last post by:
Hi everyone! I have a bit of a weird problem right now with the addition of a record in a subform. The database is supposed to keep track of a list of projects for a consulting company. There are a few sort criteria made by checkboxes, and the projects shown update immediately to reflect that. There are a series of companies that work...
5
4576
by: Mike | last post by:
Hello All, Please, if anyone can point me to the problem, I'd sure appreciate it! I am very new to VB programming and not a programmer to begin with. This is part of a Visual Basic 2005 Express Edition program to control a remote basketball scoreboard display unit. All I'm trying to do is add 5 byte variables and store the result in an...
3
1594
by: srinivas33034 | last post by:
Hi there, my problem is i have to perform addition dyamically My req is i have 3 txt boxes.. and another text box to display total additon.. as i am entering the values in TextBox1 i want to see the updated addition performed so far in the final textbox..
0
7270
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7178
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
7563
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
7125
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
7543
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
5703
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...
1
5102
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...
1
813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
470
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.