Remove useless class and add new plugin hooks
This commit is contained in:
parent
2f3563714b
commit
43cffe2828
|
|
@ -1,34 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Kanboard\Auth;
|
|
||||||
|
|
||||||
use Pimple\Container;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Base auth class
|
|
||||||
*
|
|
||||||
* @package auth
|
|
||||||
* @author Frederic Guillot
|
|
||||||
*/
|
|
||||||
abstract class Base extends \Kanboard\Core\Base
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Database instance
|
|
||||||
*
|
|
||||||
* @access protected
|
|
||||||
* @var \PicoDb\Database
|
|
||||||
*/
|
|
||||||
protected $db;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor
|
|
||||||
*
|
|
||||||
* @access public
|
|
||||||
* @param \Pimple\Container $container
|
|
||||||
*/
|
|
||||||
public function __construct(Container $container)
|
|
||||||
{
|
|
||||||
$this->container = $container;
|
|
||||||
$this->db = $this->container['db'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace Kanboard\Auth;
|
namespace Kanboard\Auth;
|
||||||
|
|
||||||
|
use Kanboard\Core\Base;
|
||||||
use Kanboard\Model\User;
|
use Kanboard\Model\User;
|
||||||
use Kanboard\Event\AuthEvent;
|
use Kanboard\Event\AuthEvent;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace Kanboard\Auth;
|
namespace Kanboard\Auth;
|
||||||
|
|
||||||
|
use Kanboard\Core\Base;
|
||||||
use Kanboard\Event\AuthEvent;
|
use Kanboard\Event\AuthEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -85,7 +86,7 @@ class Github extends Base
|
||||||
* Get OAuth2 configured service
|
* Get OAuth2 configured service
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @return KanboardCore\OAuth2
|
* @return Kanboard\Core\OAuth2
|
||||||
*/
|
*/
|
||||||
public function getService()
|
public function getService()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace Kanboard\Auth;
|
namespace Kanboard\Auth;
|
||||||
|
|
||||||
|
use Kanboard\Core\Base;
|
||||||
use Kanboard\Event\AuthEvent;
|
use Kanboard\Event\AuthEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace Kanboard\Auth;
|
namespace Kanboard\Auth;
|
||||||
|
|
||||||
|
use Kanboard\Core\Base;
|
||||||
use Kanboard\Event\AuthEvent;
|
use Kanboard\Event\AuthEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace Kanboard\Auth;
|
namespace Kanboard\Auth;
|
||||||
|
|
||||||
|
use Kanboard\Core\Base;
|
||||||
use Kanboard\Event\AuthEvent;
|
use Kanboard\Event\AuthEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace Kanboard\Auth;
|
namespace Kanboard\Auth;
|
||||||
|
|
||||||
|
use Kanboard\Core\Base;
|
||||||
use Kanboard\Core\Request;
|
use Kanboard\Core\Request;
|
||||||
use Kanboard\Event\AuthEvent;
|
use Kanboard\Event\AuthEvent;
|
||||||
use Kanboard\Core\Security;
|
use Kanboard\Core\Security;
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace Kanboard\Auth;
|
namespace Kanboard\Auth;
|
||||||
|
|
||||||
|
use Kanboard\Core\Base;
|
||||||
use Kanboard\Event\AuthEvent;
|
use Kanboard\Event\AuthEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<div class="form-login">
|
<div class="form-login">
|
||||||
|
|
||||||
|
<?= $this->hook->render('template:auth:login-form:before') ?>
|
||||||
|
|
||||||
<?php if (isset($errors['login'])): ?>
|
<?php if (isset($errors['login'])): ?>
|
||||||
<p class="alert alert-error"><?= $this->e($errors['login']) ?></p>
|
<p class="alert alert-error"><?= $this->e($errors['login']) ?></p>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
@ -31,6 +33,8 @@
|
||||||
</form>
|
</form>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
|
|
||||||
|
<?= $this->hook->render('template:auth:login-form:after') ?>
|
||||||
|
|
||||||
<?php if (GOOGLE_AUTH || GITHUB_AUTH || GITLAB_AUTH): ?>
|
<?php if (GOOGLE_AUTH || GITHUB_AUTH || GITLAB_AUTH): ?>
|
||||||
<ul class="no-bullet">
|
<ul class="no-bullet">
|
||||||
<?php if (GOOGLE_AUTH): ?>
|
<?php if (GOOGLE_AUTH): ?>
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,8 @@ Template name without prefix are core templates.
|
||||||
|
|
||||||
List of template hooks:
|
List of template hooks:
|
||||||
|
|
||||||
|
- `template:auth:login-form:before`
|
||||||
|
- `template:auth:login-form:after`
|
||||||
- `template:dashboard:sidebar`
|
- `template:dashboard:sidebar`
|
||||||
- `template:config:sidebar`
|
- `template:config:sidebar`
|
||||||
- `template:config:integrations`
|
- `template:config:integrations`
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue