summaryrefslogtreecommitdiff
path: root/app/Model/ProjectPermissionModel.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-07-28 16:56:37 -0400
committerFrederic Guillot <fred@kanboard.net>2016-07-28 16:56:37 -0400
commitf3e16da4ac8eb5f06c7f8a0aed49fd3dd11817ec (patch)
tree1c4ea8b49d63077a49a99c79fd7a96fcaeefadc4 /app/Model/ProjectPermissionModel.php
parent837173cf935a7f5f9c12c69f131a63e0f181d8f3 (diff)
Allow users to see inactive projects
Diffstat (limited to 'app/Model/ProjectPermissionModel.php')
-rw-r--r--app/Model/ProjectPermissionModel.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/Model/ProjectPermissionModel.php b/app/Model/ProjectPermissionModel.php
index a7c1857c..4882343d 100644
--- a/app/Model/ProjectPermissionModel.php
+++ b/app/Model/ProjectPermissionModel.php
@@ -152,6 +152,18 @@ class ProjectPermissionModel extends Base
}
/**
+ * Get all project ids by user
+ *
+ * @access public
+ * @param integer $user_id
+ * @return array
+ */
+ public function getProjectIds($user_id)
+ {
+ return array_keys($this->projectUserRoleModel->getProjectsByUser($user_id));
+ }
+
+ /**
* Copy permissions to another project
*
* @param integer $project_src_id Project Template