Re: Applied math challange / Possible Project




popsovy@xxxxxxxxxxx wrote:

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.

Realistically, how many "classes" of users are there likely to be?
Generally in apps like the one you describe, all the users fall into
one of several categories: sys admins (who can do anything),
supervisors, and plebs of one form or another. If you can narrow
down the classes of the latter two, your best bet is to define an
access table with each record as follows:

* User class or type (a number, e.g. 0 for admin,
100+x for supervisors, 200+y for other users, where
x and y are "subtypes" if you like)

* Windows form name or id (the latter probably
a foreign key into a form table)

* Access type to form by user class:
0 for none, +1 for read, +2 for write

Make the first two a unique compound key, and then
for any given user you can look up their type code
from the user table, and then hoist the record for
any combination of that and the form they wish to
enter.

I wouldn't bother with smart-ass encoding schemes,
trying to pack bits into bytes and so on. These days
a table with even 100,000 records (especially small
ones like the above) is chicken feed provided the
indexing is sound for the ways the records are
randomly accessed.

P.S. This isn't really a maths problem, as you claim.
But grouping users into classes is a technique with
a long maths pedigree ;-P

.



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)
  • 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: 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: 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. ... and assign access rights for groups of controls or objects to groups ...
    (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)