Access control: Show hide Column via URL

QuestionsAccess control: Show hide Column via URL
Mario asked 8 years ago

Hi,

how is it better possible to show hide a Column via URL
I got some results with the code on top of the page:

<?php
$columnhidestatus= $_GET["columnhidestatus"]; if (!isset($columnhidestatus)) $columnhidestatus= true;
?>

And within the columns:

$col = array();
$col["title"] = "column"
$col["name"] = "column"; // grid column name, same as db field or alias from sql
$col["hidden"] = $columnhidestatus;
$cols[] = $col;

When calling website.com?columntohide=false it hides the column, if its not set in url, telling "hidden=true". But It does not work for more columns. Is there another more secure way for this?

This feature would allow to make accesscontroll, via URL who may edit a column who not. The editor would need to know the variablename like "columnhidestatus", if he does not know he can not edit. However this works only for 1 column…

Best regards,
Mario

1 Answers
Your Answer

16 + 17 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?