ksa
Posts: 27
|
Posted: 12/01/2013, 7:06 AM |
|
I have a page where I want to hide certain components for everyone but members of the admin group (1). It works just fine on a panel I put at the top of the page, but when I want to do the same thing for an element within a grid row, it doesn't work.
I have the panel set as invisible as the default, and then I apply this custom code to the panel in order to show it to admins:
if (CCGetGroupID() == 1 ){
$paneladmin->Visible = True;
}
For the panel located within the grid, the default setting is also invisible. Then I apply this custom code to the panel:
if (CCGetGroupID() == 1 ){
$paneledit->Visible = True;
}
That is, it's the exact same code except for the component name. The top panel comes and goes just fine depending on who is logged whereas the panel within the grid is always invisible.
If I invert things and let the panel be visible as the default and use a (CCGetGroupID() !== 1 to hide it for non-admins, it's always visible.
It drives me crazy. What did I miss?
|