Add Gitlab authentication
This commit is contained in:
@@ -23,7 +23,7 @@ class Acl extends Base
|
||||
'webhook' => '*',
|
||||
'ical' => '*',
|
||||
'feed' => '*',
|
||||
'oauth' => array('google', 'github'),
|
||||
'oauth' => array('google', 'github', 'gitlab'),
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user