On 2018-11-05 16:23, Matthias Hunstock wrote:
If I was forced to implement something like this, I
would create a
good-named VIEW in the database with the extra WHERE clause (given that
it is static). Of course it depends on where you prefer to have the
"business logic" of the decision who may use which server. This gives
some additional obstacle that the perdition database user cannot
accidentally be granted with write privilege to the actual table, and
if
you ever have to change something in the table, you do not need to
adapt
the perdition config.
Thank you Matthias!
I can't believe I had a blind spot for this feature.. A view would solve
most
of my worries, and keep the logic in the server where it belongs.
Something as simple as this:
CREATE VIEW tblPerdition (user,servername) AS SELECT email,mailserver
FROM users WHERE somecondition
Then perdition can use its defaults for tablename and column names.
kind regards,
Harald