Re: Applied math challange / Possible Project



popsovy@xxxxxxxxxxx said:
Hello,

I have a math problem that is outside of my comprehension. I would like
to get an advice or even hire a math guru to help me.

I am a programmer, and I am trying to create an authorization scheme
for a multi-user application. My application will be done in Windows
Forms (Microsoft) and will allow users to manipulate data stored in a
database.

Each control in the Windows forms application has a unique ID.
A user can have three levels of permission to a control: None, Read,
Write.
Each control can display data for one or more business entities. Each
business entity has a unique ID. A user can have either None, Read, or
Write permissions to the data of each business entity.

I know I can solve this problem by setting up a database where I
maintain in a tabular format what users have access to what controls
and what users have access to what business entity data, but...
rendering of forms will be slow, since I have hundreds of controls, and
I was wondering if this problem can be solved mathematically.

I apologize for the following armaturish discussion, but here it is:
Would that be possible to assign a number to each user that will embody
user rights? For example, if a user has Read access to Control ID 2,
the user number will have this information stored in some kind of
mathematical way in a single 16-byte number. Then, once it's time to
decide what permissions to give to a particular user, some math formula
needs to be applied to the user number based on the control ID.

I do not want to use Binary since this solution will not scale. The
other option I considered was to use prime numbers, and I am still
considering it.

I know this post may be confusing, so please email your questions, if
you have any.

Thanks a lot for your help and please remember that if you think you
know of a good mathematical way to solve this, I may hire you for this
project.

Thanks!

Evgueni



If you want to allow for every user to have acccess to a different combination
of controls and data objects, then you are going to end up with two bits for
every control and object. If you want to have differing control access for each
object the user may access, then you are going to have two bits for every
combination, which is even worse. The best solution I have been able to think
of for such a scenario is to create groups of controls, users, and data
objects, and assign access rights for groups of controls or objects to groups
of users. If there is a clear connection between such groups and their rights,
so that groups tend to be more than a few users or objects, then this may save
a lot of space and processing. For instance, those users in the Management
group may have access to controls in the Advanced group, and those users in the
Accounting group may have access to data objects in the Financial group.

Once you have established your groups, you may be able to save a little more
time by making the user ID a number which reflects group membership. If you
have 20 groups, a 32 bit number can have a bit for each user group denoting
membership with a 1, and will allow for 2^12, or 4096, users in each group
combination, using the remaining 12 bits. Or, maybe you just want to have a
binary field in the user record that denotes group membership, and let the user
ID be auto-generated.

I think it's either something like this, or you use a table with a record for
each object and control that each person has access to, which isn't super
space-efficient, but with modern database indexing, shouldn't be overly
cumbersome or slow if you use binary keys. I'd go for groups. They're useful
generally, anyway, for all sorts of reporting purposes.

Hope that was helpful.
--
Smiles,

Tony
.



Relevant Pages

  • Re: Applied math challange / Possible Project
    ... I have a math problem that is outside of my comprehension. ... Each control in the Windows forms application has a unique ID. ... Write permissions to the data of each business entity. ...
    (sci.math)
  • Re: Modern censorship
    ... a math professor who after harassing me for years ... >Sure I derided math journals for years but I wrote a paper and sent it ... >History shows that there are always those of the mob, ... >themselves to try and control the few, or especially, the one. ...
    (sci.math)
  • Re: Applied math challange / Possible Project
    ... I have a math problem that is outside of my comprehension. ... Each control in the Windows forms application has a unique ID. ... Write permissions to the data of each business entity. ...
    (sci.math)
  • Applied math challange / Possible Project
    ... I have a math problem that is outside of my comprehension. ... Each control in the Windows forms application has a unique ID. ... Write permissions to the data of each business entity. ...
    (sci.math)
  • Re: PD(PI) Math Model (e.g.Tank Level) Still in need of CORRECTION!
    ... away with when they combine the plant and controller transfer functions ... But it's there in my book, and in a form that can be handled by someone with greasy hands and a pencil to do the math, instead of a form that requires access to a university math department and a super computer or two. ... But without understanding the underlying issues simulation is just a quicker way to fart around in the lab until you stumble on something that works on that day, at that temperature, with that particular choice of components. ... Do you need to implement control loops in software? ...
    (sci.engr.control)