summaryrefslogtreecommitdiff
path: root/app/Api/Procedure/GroupMemberProcedure.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Api/Procedure/GroupMemberProcedure.php')
-rw-r--r--app/Api/Procedure/GroupMemberProcedure.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/app/Api/Procedure/GroupMemberProcedure.php b/app/Api/Procedure/GroupMemberProcedure.php
new file mode 100644
index 00000000..081d6ac8
--- /dev/null
+++ b/app/Api/Procedure/GroupMemberProcedure.php
@@ -0,0 +1,37 @@
+<?php
+
+namespace Kanboard\Api\Procedure;
+
+/**
+ * Group Member API controller
+ *
+ * @package Kanboard\Api\Procedure
+ * @author Frederic Guillot
+ */
+class GroupMemberProcedure extends BaseProcedure
+{
+ public function getMemberGroups($user_id)
+ {
+ return $this->groupMemberModel->getGroups($user_id);
+ }
+
+ public function getGroupMembers($group_id)
+ {
+ return $this->groupMemberModel->getMembers($group_id);
+ }
+
+ public function addGroupMember($group_id, $user_id)
+ {
+ return $this->groupMemberModel->addUser($group_id, $user_id);
+ }
+
+ public function removeGroupMember($group_id, $user_id)
+ {
+ return $this->groupMemberModel->removeUser($group_id, $user_id);
+ }
+
+ public function isGroupMember($group_id, $user_id)
+ {
+ return $this->groupMemberModel->isMember($group_id, $user_id);
+ }
+}