Page 2 of 2
Re: Changing SQL query of the Browse Form
Posted: Thu Jul 25, 2019 7:56 am
by Janusz
checking more the downloaded file by wget - it looks like that only html part of code is downloaded and php part not - so probably can be used directly without security risk - but not sure for that.
Maybe - can someone else share the opinion regarding security of code from the example from link above - I mean is the password in that file protected from being disclosed?
Re: Changing SQL query of the Browse Form
Posted: Mon Jul 29, 2019 1:37 am
by nc07
Thanks Januz,
I have figured a way out, needs some testing, we'll see how it works.
regards
nc07
Re: Changing SQL query of the Browse Form
Posted: Mon Jul 29, 2019 7:03 am
by Janusz
Hi,
If you need some data just for review only - so maybe you could use directly www page(s) - and protect them with the password(s). Then they will have access to data even without login into nuBuilder.
Re: Changing SQL query of the Browse Form
Posted: Mon Jul 29, 2019 11:11 pm
by nc07
Janusz wrote:Hi,
If you need some data just for review only - so maybe you could use directly www page(s) - and protect them with the password(s). Then they will have access to data even without login into nuBuilder.
Thanks Januz,
At the moment I would like them to access data through NuBuilder user but may be later we may consider other options.
regards
nc07
Re: Changing SQL query of the Browse Form
Posted: Wed Jul 31, 2019 1:00 am
by admin
nc07,
See if this makes sense.
It will allow any of 3 users.
Create a Table and Form...
man3.JPG
With these fields...
man2.JPG
Code: Select all
$s = "
CREATE TABLE #TABLE_ID#
SELECT * FROM storage
JOIN manager ON man_zzzzsys_user_id = sto_zzzzsys_user_id
JOIN access ON zzzzsys_access_id = man_zzzzsys_access_id
WHERE 'manager_id' = '#USER_ID#'
OR sto_zzzzsys_user_id = '#USER_ID#'
OR (sal_code = '#ACCESS_LEVEL_CODE#' AND man_zzzzsys_user_id = '#USER_ID#')
";
(I have invented a field I have called
sto_zzzzsys_user_id in your storage table.)
WHERE 'manager_id' = '#USER_ID#'
gets General Manager (hard coded User ID)
OR sto_zzzzsys_user_id = '#USER_ID#'
gets User
OR (sal_code = '#ACCESS_LEVEL_CODE#' AND man_zzzzsys_user_id = '#USER_ID#')
gets Manager
Steven
Re: Changing SQL query of the Browse Form
Posted: Wed Jul 31, 2019 11:44 pm
by nc07
Thanks, Steven for your guidance,
I will do trials and let you know of the outcome.
Best Regards
nc07
Re: Changing SQL query of the Browse Form
Posted: Thu Aug 01, 2019 12:07 am
by admin
ok