Andre
⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠
Posted 14 May 2015 - 21:03 PM
Andre
Posted 18 May 2015 - 11:58 AM
I'dd like a solution for this too ;)
Posted 19 May 2015 - 04:24 AM
Posted 22 May 2015 - 02:29 AM
i achieved it by following mechanism
if($crud->getState()=='edit') { $info = $crud->getStateInfo(); $pk = $info->primary_key; $row = $this->common_model->getByField('payments', 'id', $pk); ////my way or querying the database //once u got the row - u can check if the logged in user have rights for the same //if not.. throw him error ... else allow him }
Posted 02 June 2015 - 12:05 PM
Hi guys! First off all, GC for admin part of app, and if admin can access to another ID - so what?
Second - if you need separate access level, then just check for user access level in controller and that is. Or i smth missing?
Posted 26 August 2015 - 11:55 AM
i achieved it by following mechanism
if($crud->getState()=='edit') { $info = $crud->getStateInfo(); $pk = $info->primary_key; $row = $this->common_model->getByField('payments', 'id', $pk); ////my way or querying the database //once u got the row - u can check if the logged in user have rights for the same //if not.. throw him error ... else allow him }
Sorry for my late reply...
It works, but is not what i am looking for wouldn't is be easier to encrypt/decrypt the id? (using Id + sessionid or something??)
Posted 28 August 2015 - 10:05 AM
I'm also searching for the same issue...
Posted 28 August 2015 - 11:54 AM
Well.. having it set in session is not possible.. because this is the first encounter for you. If you wish to do the same then what you have to do is .. every edit link click u have set the same in session and then retrieve it in such scenario... not a good option as i forsee, this is much simpler.. Post that you also at some point of time need to remove the id set in session as it might mingle around in another crud function and so on.