aboutsummaryrefslogtreecommitdiff
path: root/app/views/index
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-06 23:29:20 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-10-06 23:29:20 +0200
commit79aa5beaf44af13a1828bfa5fc824a08c62054dc (patch)
tree53841c4ba4af03498c9005ced85cd1996cb9ca9b /app/views/index
parent530a1d4b6b043f6b6976bb7ad25b380c29d5b5a4 (diff)
Refactor authentication system.
Big work, not finished. A lot of features have been removed. See https://github.com/marienfressinaud/FreshRSS/issues/655
Diffstat (limited to 'app/views/index')
-rw-r--r--app/views/index/index.phtml2
-rw-r--r--app/views/index/login.phtml1
-rw-r--r--app/views/index/logout.phtml1
-rw-r--r--app/views/index/resetAuth.phtml33
4 files changed, 1 insertions, 36 deletions
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index 584792e29..a59063557 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -2,7 +2,7 @@
$output = Minz_Request::param('output', 'normal');
-if ($this->loginOk || Minz_Configuration::allowAnonymous()) {
+if (FreshRSS_Auth::hasAccess() || Minz_Configuration::allowAnonymous()) {
if ($output === 'normal') {
$this->renderHelper('view/normal_view');
} elseif ($output === 'reader') {
diff --git a/app/views/index/login.phtml b/app/views/index/login.phtml
deleted file mode 100644
index 79fbe9d21..000000000
--- a/app/views/index/login.phtml
+++ /dev/null
@@ -1 +0,0 @@
-<?php print_r($this->res); ?>
diff --git a/app/views/index/logout.phtml b/app/views/index/logout.phtml
deleted file mode 100644
index a0aba9318..000000000
--- a/app/views/index/logout.phtml
+++ /dev/null
@@ -1 +0,0 @@
-OK \ No newline at end of file
diff --git a/app/views/index/resetAuth.phtml b/app/views/index/resetAuth.phtml
deleted file mode 100644
index 6d4282c14..000000000
--- a/app/views/index/resetAuth.phtml
+++ /dev/null
@@ -1,33 +0,0 @@
-<div class="prompt">
- <h1><?php echo _t('auth_reset'); ?></h1>
-
- <?php if (!empty($this->message)) { ?>
- <p class="alert <?php echo $this->message['status'] === 'bad' ? 'alert-error' : 'alert-warn'; ?>">
- <span class="alert-head"><?php echo $this->message['title']; ?></span><br />
- <?php echo $this->message['body']; ?>
- </p>
- <?php } ?>
-
- <?php if (!$this->no_form) { ?>
- <form id="crypto-form" method="post" action="<?php echo _url('index', 'resetAuth'); ?>">
- <p class="alert alert-warn">
- <span class="alert-head"><?php echo _t('attention'); ?></span><br />
- <?php echo _t('auth_will_reset'); ?>
- </p>
-
- <div>
- <label for="username"><?php echo _t('username_admin'); ?></label>
- <input type="text" id="username" name="username" size="16" required="required" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" autofocus="autofocus" />
- </div>
- <div>
- <label for="passwordPlain"><?php echo _t('password'); ?></label>
- <input type="password" id="passwordPlain" required="required" />
- <input type="hidden" id="challenge" name="challenge" /><br />
- <noscript><strong><?php echo _t('javascript_should_be_activated'); ?></strong></noscript>
- </div>
- <div>
- <button id="loginButton" type="submit" class="btn btn-important"><?php echo _t('submit'); ?></button>
- </div>
- </form>
- <?php } ?>
-</div>