diff options
Diffstat (limited to 'app/Model/ProjectPermission.php')
-rw-r--r-- | app/Model/ProjectPermission.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/app/Model/ProjectPermission.php b/app/Model/ProjectPermission.php index 4ad9bbf1..66f4091d 100644 --- a/app/Model/ProjectPermission.php +++ b/app/Model/ProjectPermission.php @@ -86,12 +86,25 @@ class ProjectPermission extends Base * @param integer $user_id * @return boolean */ - public function isMember($project_id, $user_id) + public function isAssignable($project_id, $user_id) { return in_array($this->projectUserRole->getUserRole($project_id, $user_id), array(Role::PROJECT_MEMBER, Role::PROJECT_MANAGER)); } /** + * Return true if the user is member + * + * @access public + * @param integer $project_id + * @param integer $user_id + * @return boolean + */ + public function isMember($project_id, $user_id) + { + return in_array($this->projectUserRole->getUserRole($project_id, $user_id), array(Role::PROJECT_MEMBER, Role::PROJECT_MANAGER, Role::PROJECT_VIEWER)); + } + + /** * Get active project ids by user * * @access public |