Skip to content

Commit 4d17d0f

Browse files
committed
Remove login in side bar
Change-Id: Id7cd9eec82b0132c02083ed76e222e013e581834
1 parent a17b08d commit 4d17d0f

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

lib/Kalamar/Plugin/Auth.pm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,11 @@ sub register {
235235

236236

237237
# Add login frame to sidebar
238-
$app->content_block(
239-
sidebar => {
240-
template => 'partial/auth/login'
241-
}
242-
);
238+
# $app->content_block(
239+
# sidebar => {
240+
# template => 'partial/auth/login'
241+
# }
242+
# );
243243

244244

245245
# Add logout button to header button list

lib/Kalamar/Plugin/Auth/templates/partial/auth/login.html.ep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
%# # user not logged in
2+
% my $embedded = stash('embedded');
23
% if (!$embedded && !$c->auth->token) {
34
% if (flash('handle_or_email') && !param('handle_or_email')) {
45
% param(handle_or_email => flash('handle_or_email'));

t/plugin/auth-oauth.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ $t->get_ok('/?q=Baum')
110110
->content_like(qr/${q}authorized${q}:null/)
111111
->element_exists_not('div.button.top a')
112112
->element_exists_not('aside.active')
113-
->element_exists_not('aside.off')
113+
->element_exists('aside.off')
114114
;
115115

116116
$t->get_ok('/')

templates/partial/side.html.ep

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
% my $classes = '';
44

5-
% if (length($side_bar) == 0) {
5+
%# TODO: This should not check for login!!!
6+
% my $helpers = app->renderer->helpers;
7+
% if (length($side_bar) == 0 && exists($helpers->{'auth.token'}) && $c->auth->token) {
68
% if (my $nav = navigation('settings')) {
79
% $side_bar = b('<nav>' . $nav . '</nav>');
810
% $classes = 'settings ';

0 commit comments

Comments
 (0)