Add projects to the dashboard and rename some methods

This commit is contained in:
Frédéric Guillot
2014-11-09 12:47:49 -05:00
parent e0117cb8ed
commit 3df63e051f
30 changed files with 262 additions and 75 deletions

View File

@@ -77,6 +77,16 @@ function is_admin()
return $_SESSION['user']['is_admin'] == 1;
}
/**
* Return true if the user can configure the project (project are previously filtered)
*
* @return boolean
*/
function is_project_admin(array $project)
{
return is_admin() || $project['is_private'] == 1;
}
/**
* Return the username
*