Hi Doug,

Good question!

The idea is that I’ll get the set of PROVIDERs
Where the PROVIDER’s logon_user_name is either null or matches the 
current_organisation. Current_organisation is a single row GTT that identifies 
the organisational entity that work is being done for. It’s populated (with one 
row) by an ON CONNECT trigger according to the organisation a user has been 
linked to.

The idea is that a provider who has a logon name will be restricted (by the 
software) to certain organisations.
A provider who has not been restricted by logon name will be able to logon to 
any organisation.

Providers are people who provide services to customers. Some people can be 
represented by any user (p.logon_user_name is null) whilst others can only be 
represented by a single user.

Since I am just doing a migration I can’t change the logic, no matter how 
bizarre 😊

Brian

From: [email protected] [mailto:[email protected]]
Sent: Tuesday, 7 November 2017 3:25 AM
To: firebird-support <[email protected]>
Subject: Re: [firebird-support] Firebird 3.0 grant to VIEW with GTT not working


Brian-

Sorry, I do not have any insights on this problem. I am curious, however, what 
you intend with that join:

join current_organisation co on exists(select 1
                                                          from 
user_organisation uo
                                                          where uo.ib_username 
= p.logon_user_name
                                                          and 
uo.parameters_organisation_no = co.parameters_organisation_no)

Why code it this way? What are you trying to achieve? As you indicate, looks 
bizarre.

Thanks!

Doug C.


Reply via email to