Thanks Dave, working my way through it.
Kind regards
Andrew Stirling 01250 870397 07910467915 support@calcpay.co.uk http://www.calcpay.co.uk
On 18/01/2017 17:17, Dave Crozier wrote:
Andrew, Have an intermediate table that contains the User_Id, Owner_Id and a third field of the Client_Id which the user can access.
If you allowed the Client_Id to contain say "*" that would signify that the user can access all the clients of a particular owner. This would save creating a record per client but obviously would involve some sort of programming exception to signify all clients were available to view.
E.g User: U01 U02 U03
Owner: O01 O02 O03
Client: C01 C01 .. C99
Clients User_Id, Owner_Id U01,O01, C01 <<=Client C01 for Owner O01 available to User U01 to view U01,O01, C02 <<=Client C02 for Owner O01 available to User U01 to view U01,O01, C03 <<=Client C03 for Owner O01 available to User U01 to view ... U01,O02,* <<=All clients belonging to Owner O02 available to User U01 .. Etc.
Hopefully you get the idea...
Made simple or tricky depending on where your data is held (VFP or SQL) in either case a Stored Procedure or View would pass back the clients available to view for a user. Dave.
-----Original Message----- From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Andrew Stirling Sent: 18 January 2017 16:05 To: profox@leafe.com Subject: Restrict access to multi clients
I'm trying to get an online system working that allows: Users to log in to an Owner organisation ie firm of accountants. Owner to display list of clients to work on.
So I have that working with User: Id owner_id
Owner Id
Clients Id owner_id
User has owner relationship and owner has client relationship.
Thus User can choose from a list of clients to work on.
HOWEVER what I want is to be able to restrict the clients that the User can see.
How do I go about that?
-- Kind regards
Andrew Stirling 01250 870397 07910467915 support@calcpay.co.uk http://www.calcpay.co.uk
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
[excessive quoting removed by server]