summaryrefslogtreecommitdiff
path: root/app/helpers.php
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-11-09 12:47:49 -0500
committerFrédéric Guillot <fred@kanboard.net>2014-11-09 12:47:49 -0500
commit3df63e051fac84cec98c912668722f87d6e8183e (patch)
tree648a92db37f3295669ae6cc59126fc003235cfa8 /app/helpers.php
parente0117cb8ed6326e8c77a02ce265c2b5f195e08d8 (diff)
Add projects to the dashboard and rename some methods
Diffstat (limited to 'app/helpers.php')
-rw-r--r--app/helpers.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers.php b/app/helpers.php
index a2b91378..f25db0f0 100644
--- a/app/helpers.php
+++ b/app/helpers.php
@@ -78,6 +78,16 @@ function is_admin()
}
/**
+ * 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
*
* @param array $user User properties (optional)