473,729 Members | 2,371 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 1973
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.tl d> wrote in message
news:<rx******* ************@tw ister.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
1230
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 appreciated. Here's the code:
24
2712
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
1733
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 I am the admin, am locked from making changes. Any thoughts on how to make this change will be...
34
16686
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
1249
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 themselves without needing the administrator to change for them.
3
2186
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 << endl; }
2
1432
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 is being done for, and for
5
4595
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 integer variable. I added a Try/Catch block to take look at things. This exception occurs only when...
3
1609
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
9427
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9202
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
8151
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
6722
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
4528
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...
0
4796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2683
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2165
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.