[ic] Ok heres my problem...

Mike Heins interchange-users@interchange.redhat.com
Mon Mar 25 15:55:00 2002


Quoting Ron Phipps (rphipps@reliant-solutions.com):
> > From: interchange-users-admin@interchange.redhat.com
> [mailto:interchange-
> > users-admin@interchange.redhat.com] On Behalf Of micah abrams
> > 
> > Dear list --
> > 
> > I am hoping one of you can help me (or at least point me in the right
> > direction).  I have a storefront that I setup using interchange.  I am
> > selling products for a few different companies and would like to give
> each
> > customer a unique login to the admin section which would allow them to
> > manage their own inventories (and only thier inventories).  I am
> rather
> > new
> > to interchange and am looking for the easiest possible way to solve
> this
> > problem.  
> 
> IC does not provide row level ownership of records, only table level
> ownership.  The main reason is most of the underlying databases do not
> have this functionality.

Actually, it does. If you set tables permission owner_field to
"related", and set the "related" field in products to the username of
the owner, I think you will find that user will only be able to edit
their own records.

The table_control entry in access.asc that would enable this is:

	{ owner_field => 'related' }

You could just as easily add a field called owner or vendor to the products
table and user that.

There are issues in displaying the edit list, but that would be relatively
easy to fix in a custom version of admin/flex_select.html, whereby you
just qualify any search term with related=[data session username].

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

Nature, to be commanded, must be obeyed. -- Francis Bacon