Add Gitlab authentication

This commit is contained in:
Frederic Guillot
2015-08-23 13:15:59 -04:00
parent 297c11e48e
commit 8eb739bb91
40 changed files with 501 additions and 9 deletions

View File

@@ -23,7 +23,7 @@ class Acl extends Base
'webhook' => '*',
'ical' => '*',
'feed' => '*',
'oauth' => array('google', 'github'),
'oauth' => array('google', 'github', 'gitlab'),
);
/**

View File

@@ -138,6 +138,22 @@ class User extends Base
return $this->db->table(self::TABLE)->eq('github_id', $github_id)->findOne();
}
/**
* 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
*