File Galleries list
Galleries list seems to show all or no Galleries, i was trying to hide some galleries from some groups, (i.e. stop then asking about stuff i dont want them to see)
i dont know if this is use but i found the i could do this by:
To get this ive changed the way that tikiwiki handles this with 4 small changes:
In the file lib/filegals/filegallib.php, rows 137 - 148 i have changed from:
$add = TRUE;
global $feature_categories;
global $userlib;
global $user;
global $tiki_p_admin;
if ($tiki_p_admin != 'y' && $userlib->object_has_one_permission($res[['galleryId']]", 'file gallery')) {
// gallery permissions override category permissions
if (!$userlib->object_has_permission($user, $res[['galleryId']], 'file gallery', 'tiki_p_view_file_gallery')) {
$add = FALSE;
}
To:
$add = FALSE;
global $feature_categories;
global $userlib;
global $user;
global $tiki_p_admin;
__if($tiki_p_admin=='y' || $userlib->object_has_permission($user,$galleries[[data]][[$i]][['galleryId']],'file gallery','tiki_p_admin_file_galleries')) {
$add = TRUE;
}
__
if ($tiki_p_admin != 'y' && $userlib->object_has_one_permission($res[['galleryId']], 'file gallery')) {
// gallery permissions override category permissions
if (!$userlib->object_has_permission($user, $res[['galleryId']], 'file gallery', 'individual_tiki_p_view_file_gallery')) {
$add = TRUE;
}
I.e. by default dont view, If has admin rights view or if user has permission do.