I'd like your opinions on how you handle file access in your web applications. The reason I ask is that I'm building a web app that needs 4 different views of the same web application (admin, engineering, sales, and customer views).
Is it as simple as
if ($permission == 'admin')
{
include('/admin/file.inc');
}
elseif ($permission == 'engineering')
{
include('/engineering/file.inc');
}
// and so on...
or is it more complicated? I think the above strategy would become unmanageable as the application grows and scales, which I must take into consideration. What has worked best for you?