summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/Acl.php2
-rw-r--r--app/Model/User.php16
2 files changed, 17 insertions, 1 deletions
diff --git a/app/Model/Acl.php b/app/Model/Acl.php
index e93bf1d9..8c28cb1a 100644
--- a/app/Model/Acl.php
+++ b/app/Model/Acl.php
@@ -23,7 +23,7 @@ class Acl extends Base
'webhook' => '*',
'ical' => '*',
'feed' => '*',
- 'oauth' => array('google', 'github'),
+ 'oauth' => array('google', 'github', 'gitlab'),
);
/**
diff --git a/app/Model/User.php b/app/Model/User.php
index 1a7a0666..8a7eff4a 100644
--- a/app/Model/User.php
+++ b/app/Model/User.php
@@ -139,6 +139,22 @@ class User extends Base
}
/**
+ * Get a specific user by the Gitlab id
+ *
+ * @access public
+ * @param string $gitlab_id Gitlab user id
+ * @return array|boolean
+ */
+ public function getByGitlabId($gitlab_id)
+ {
+ if (empty($gitlab_id)) {
+ return false;
+ }
+
+ return $this->db->table(self::TABLE)->eq('gitlab_id', $gitlab_id)->findOne();
+ }
+
+ /**
* Get a specific user by the username
*
* @access public