diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-29 23:59:58 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-29 23:59:58 -0500 |
commit | 9b9d823f30f7f7744f412df8ca4c52d7be3c9977 (patch) | |
tree | 50a21284bf17246206c102153ff60a890888d4f2 /app/Template/user | |
parent | 04d8c6532c441c4ba4699020374ffab85685082d (diff) |
Move Gitlab and Github authentication to external plugins
Diffstat (limited to 'app/Template/user')
-rw-r--r-- | app/Template/user/authentication.php | 6 | ||||
-rw-r--r-- | app/Template/user/create_remote.php | 9 | ||||
-rw-r--r-- | app/Template/user/external.php | 34 |
3 files changed, 2 insertions, 47 deletions
diff --git a/app/Template/user/authentication.php b/app/Template/user/authentication.php index 1f2d2a69..0c08f3fb 100644 --- a/app/Template/user/authentication.php +++ b/app/Template/user/authentication.php @@ -10,12 +10,6 @@ <?= $this->hook->render('template:user:authentication:form', array('values' => $values, 'errors' => $errors, 'user' => $user)) ?> - <?= $this->form->label(t('Github Id'), 'github_id') ?> - <?= $this->form->text('github_id', $values, $errors) ?> - - <?= $this->form->label(t('Gitlab Id'), 'gitlab_id') ?> - <?= $this->form->text('gitlab_id', $values, $errors) ?> - <?= $this->form->checkbox('is_ldap_user', t('Remote user'), 1, isset($values['is_ldap_user']) && $values['is_ldap_user'] == 1) ?> <?= $this->form->checkbox('disable_login_form', t('Disallow login form'), 1, isset($values['disable_login_form']) && $values['disable_login_form'] == 1) ?> diff --git a/app/Template/user/create_remote.php b/app/Template/user/create_remote.php index 1cc560cd..7399a010 100644 --- a/app/Template/user/create_remote.php +++ b/app/Template/user/create_remote.php @@ -20,14 +20,7 @@ <?= $this->form->label(t('Email'), 'email') ?> <?= $this->form->email('email', $values, $errors) ?> - <?= $this->form->label(t('Google Id'), 'google_id') ?> - <?= $this->form->text('google_id', $values, $errors) ?> - - <?= $this->form->label(t('Github Id'), 'github_id') ?> - <?= $this->form->text('github_id', $values, $errors) ?> - - <?= $this->form->label(t('Gitlab Id'), 'gitlab_id') ?> - <?= $this->form->text('gitlab_id', $values, $errors) ?> + <?= $this->hook->render('template:user:create-remote:form', array('values' => $values, 'errors' => $errors)) ?> </div> <div class="form-column"> diff --git a/app/Template/user/external.php b/app/Template/user/external.php index 8c9a0259..22c25af2 100644 --- a/app/Template/user/external.php +++ b/app/Template/user/external.php @@ -4,39 +4,7 @@ <?php $html = $this->hook->render('template:user:external', array('user' => $user)) ?> -<?php if (GITHUB_AUTH): ?> - <h3><i class="fa fa-github"></i> <?= t('Github Account') ?></h3> - - <p class="listing"> - <?php if ($this->user->isCurrentUser($user['id'])): ?> - <?php if (empty($user['github_id'])): ?> - <?= $this->url->link(t('Link my Github Account'), 'oauth', 'github', array(), true) ?> - <?php else: ?> - <?= $this->url->link(t('Unlink my Github Account'), 'oauth', 'unlink', array('backend' => 'Github'), true) ?> - <?php endif ?> - <?php else: ?> - <?= empty($user['github_id']) ? t('No account linked.') : t('Account linked.') ?> - <?php endif ?> - </p> -<?php endif ?> - -<?php if (GITLAB_AUTH): ?> - <h3><img src="<?= $this->url->dir() ?>assets/img/gitlab-icon.png"/> <?= t('Gitlab Account') ?></h3> - - <p class="listing"> - <?php if ($this->user->isCurrentUser($user['id'])): ?> - <?php if (empty($user['gitlab_id'])): ?> - <?= $this->url->link(t('Link my Gitlab Account'), 'oauth', 'gitlab', array(), true) ?> - <?php else: ?> - <?= $this->url->link(t('Unlink my Gitlab Account'), 'oauth', 'unlink', array('backend' => 'Gitlab'), true) ?> - <?php endif ?> - <?php else: ?> - <?= empty($user['gitlab_id']) ? t('No account linked.') : t('Account linked.') ?> - <?php endif ?> - </p> -<?php endif ?> - -<?php if (empty($html) && ! GITHUB_AUTH && ! GITLAB_AUTH): ?> +<?php if (empty($html)): ?> <p class="alert"><?= t('No external authentication enabled.') ?></p> <?php else: ?> <?= $html ?> |