Radicore Forum - RDF feed
https://forum.radicore.org/index.php
VPD - PopUp
https://forum.radicore.org/index.phpindex.php?t=rview&goto=5799&th=2219#msg_5799
is it possible to see in a popup screen more than the allowed records as defined in the IN clause of the generated SQL query ('1', 'x')?
The system with VPD works fine but I want to release records from other account 'channels'.
I have a table where I can release the channel for other VPD accounts with the following structure:
channel_id (pk), account_id (pk), release start, ... where account_id is the system rdcaccount_id.
The popup should include the records from channel_id. I tried to change the SQL query in the (popup1).php but I didn't succeed because of the automatic generated IN clause which only allows shared accounts and the logged in account.
The 'channel' contains records which I want to release for a certain time.]]>htManager2016-08-03T10:28:53-00:00Re: VPD - PopUp
https://forum.radicore.org/index.phpindex.php?t=rview&goto=5800&th=2219#msg_5800
1) Any entry with rdcaccount_id=1 is shared and can be viewed (but not updated) by a user whose rdcaccount_id>1
2) Any entry with rdcaccount_id>1 is private to that account and can only be viewed/modified by users in that account.
It is not possible to make accounts other than #1 sharable.]]>AJM2016-08-04T08:55:56-00:00Re: VPD - PopUp
https://forum.radicore.org/index.phpindex.php?t=rview&goto=5801&th=2219#msg_5801
I read your article about Virtual private database and how you described in #5 how you altered the code for reading from the database:
else {
// read the user's account and the shared account
$account_id_string = "$this->tablename.rdcaccount_id IN ('1', '$account_id')";
}
My problem would be solved if there would be a possibility to select records from more than one account > 1.
i.e.: if ($pattern_id = 'popup'){
$account_id_string = "$this->tablename.rdcaccount_id IN ('1', '$account_id', '$account_id_additional'')";
}
where $account_id_additional would be some other selected accounts like ('8', '15', 'nnn')
The account owner can grant these (reading) access rights via a table. It would then be possible with a popup to choose data from that account.]]>htManager2016-08-04T13:12:49-00:00Re: VPD - PopUp
https://forum.radicore.org/index.phpindex.php?t=rview&goto=5803&th=2219#msg_5803
AJM2016-08-05T08:28:44-00:00Re: VPD - PopUp
https://forum.radicore.org/index.phpindex.php?t=rview&goto=5808&th=2219#msg_5808
htManager2016-08-05T10:19:37-00:00Re: VPD - PopUp
https://forum.radicore.org/index.phpindex.php?t=rview&goto=5810&th=2219#msg_5810
AJM2016-08-05T13:36:49-00:00Re: VPD - PopUp
https://forum.radicore.org/index.phpindex.php?t=rview&goto=5821&th=2219#msg_5821
I do know that this is unsupported and outside the framework.
I created two functions in a htm.general.inc file in my includes_htm directory. One for setting an entry in $_SESSION($additional_accounts) and one for unset this entry.
I changed code in _sqlAssembleWhere() and _sqlAssembleWhereLink() with the following:
if (!empty($_SESSION['account_additional_id'])){
$account_additional_id = $_SESSION['account_additional_id'];
$account_id_string = "$this->tablename.rdcaccount_id IN ('1', $account_additional_id, '$account_id')";
} else {
$account_id_string = "$this->tablename.rdcaccount_id IN ('1', '$account_id')";
}
Thus each user can decide for himself if he want to share his (account) channel with others and how long. I did notice that it isn't easy to get the problem solved. I also experienced that I could solve this problem only with 'hard coding' in my functions and that this would be very very difficult for you (as you mentioned) to solve this in Radicore. At the moment it works fine for me but I do not know if there are situations which I do not know and where users can have access to accounts where they shouldn't. But at the moment I am happy that I got it running. If you have an advice for me, please let me know.]]>htManager2016-08-12T14:48:23-00:00Re: VPD - PopUp
https://forum.radicore.org/index.phpindex.php?t=rview&goto=5823&th=2219#msg_5823
AJM2016-08-13T09:27:24-00:00Re: VPD - PopUp
https://forum.radicore.org/index.phpindex.php?t=rview&goto=5824&th=2219#msg_5824
htManager2016-08-13T10:31:18-00:00Re: VPD - PopUp
https://forum.radicore.org/index.phpindex.php?t=rview&goto=5825&th=2219#msg_5825
AJM2016-08-14T16:31:31-00:00