Is it possible to add folders which are scanned for permission handling? I can see that it searches / and /user/ (no subdirectories). I wanted to create a folder /binc in the root and have the ability to manage permissions on the pages there.
Took a look, okay. Any way stuff like that could be added to the core/ini.php file? That way settings are all contained in a single file for updates and such.
Yeah. Actually now that you mention it, I'm sure an array or something like that could be created. I'll take a look at that.
I think the quick way to do that would be to add this function to the us_helpers.php file
function getMoreFiles($location) {
$directory = "../$location";
$pages = glob($directory . "*.php");
foreach ($pages as $page){
$fixed = str_replace('../$location','',$page);
$row[$fixed] = $fixed;
}
return $row;
}
Then on your admin_pages file you would do something like...
$newFolder="myfolder"; //no beginning slash needed
then below that you would call...
$extraPages = getMoreFiles($newFolder);
Then it's just a matter of adding that $extraPages to the array.
$pages = array_merge($rootpages, $uspages,$extrapages);
I haven't tested it, but that makes sense off the top of my head.
hmm, I have lots of other permissions related stuff to explore so I'll come back to it. Off the top of my head though, since managing permissions is the core function, then easily being able to add folders, even through the UI would be helpful.
Yeah. You're right. I'll give that a whirl. I don't think it will be too hard to add.
probably could be a 4.1 feature, as long as the current method works and isn't too difficult.