I was wondering whether I can password protect the edit possibility of a line in the grid ?
We would like that everybody can SEE the full grid with values but edit should only be possible after entering userid and password (which could come from a user table).
Any possibility for this ?
Thanks very much in advance,
Grid is an independent lib. You need to implement the authentication system byself.
However, you can put conditional session variable checks on set_action() function to make it editable if authenticated, otherwise not.
may I be so blunt to ask if I can find an example of this somewhere ? I have already worked with the set_action before (for opening another screen when pushing a button) but how could I tell the button to simply do what normally the edit button does (after checking security then).
Greetings and thanks in advance,
Assume your authenticated session have session var … logged_in
if ($_SESSION["logged_in"] == 1)
$edit = true;
$edit = false;
and now for e.g.
"add"=>true, // allow/disallow add
"edit"=>$edit, // allow/disallow edit
"delete"=>true, // allow/disallow delete
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?