Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Commit

Permalink
remove need_login_always option because this option can't refuse http…
Browse files Browse the repository at this point in the history
…d git repository access
  • Loading branch information
yuki-kimoto committed Aug 22, 2013
1 parent c672c02 commit ef73027
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
1.2
- add blame page
- add blanch import feature
- add need_login_always option
1.1
- add import_rep script to import repositories.
1.0
Expand Down
4 changes: 0 additions & 4 deletions gitprep.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
;;; Tags limit (default:1000)
;tags_limit=1000

;;; If you set this value to 1, user need login to see git repositories.
;;; Default is 0
;need_login_always=1

[admin]
;;; If you forget admin password,
;;; set this value to 1 and access /reset-password page.
Expand Down
7 changes: 0 additions & 7 deletions lib/Gitprep.pm
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,6 @@ sub startup {
$self->redirect_to('/');
return;
}
# Need login always
elsif ($self->config->{basic}{need_login_always} && !$api->logined) {
if ($path ne '_start' && $path ne 'reset-password' && $path ne '_login') {
$self->redirect_to('/_login');
return;
}
}
}

return 1;
Expand Down
2 changes: 1 addition & 1 deletion xt/import_rep.t
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ note 'import_rep';

# Create admin user
$t->post_ok('/_start?op=create', form => {password => 'a', password2 => 'a'});
$t->content_like(qr/Login Page/);
$t->content_like(qr/Login page/);

# Login as admin
$t->post_ok('/_login?op=login', form => {id => 'admin', password => 'a'});
Expand Down

0 comments on commit ef73027

Please sign in to comment.