Allow Hydra to run as a private instance by requiring a login.

[?]
Jan 10, 2014, 10:04 AM
2DHE2ZAKR4AU7OE6E5CYNFWVGQXLHEX5LFKVU43PMBVX3QW6RHFAC

Dependencies

  • [2] JFW656FT Add a flag to enable Persona support
  • [3] OEPUOUNB Using twitter bootstrap for more consistent looks for Hydra
  • [4] QL55ECJ6 - adapted ui for hydra, more in line with nixos.org website
  • [5] 2G63HKCH Fix some wellformedness issues
  • [6] UICHT2PS Add a search feature
  • [7] OOZK3MF5 Show current query in the search box
  • [8] 7ZQAHJQM Fix indentation
  • [9] DV43UILU Don't float the search bar to the right in collapsed mode
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] UAPS46BQ
  • [*] EFWN7JBV * Added a status page that shows all the currently executing build steps.
  • [*] PBFZEQLZ
  • [*] MGOGOKQP add tracker html code via HYDRA_TRACKER
  • [*] K42RSSSI

Change contents

  • edit in src/lib/Hydra/Controller/Root.pm at line 15
    [11.1084]
    [12.0]
    sub noLoginNeeded {
    my ($c) = @_;
  • edit in src/lib/Hydra/Controller/Root.pm at line 19
    [12.1]
    [12.1]
    return $c->request->path eq "persona-login" ||
    $c->request->path eq "login" ||
    $c->request->path eq "logo" ||
    $c->request->path =~ /^static\//;
    }
  • edit in src/lib/Hydra/Controller/Root.pm at line 27
    [13.32]
    [14.0]
  • edit in src/lib/Hydra/Controller/Root.pm at line 37
    [2.78]
    [15.51]
    $c->stash->{isPrivateHydra} = $c->config->{private} // "0" ne "0";
  • edit in src/lib/Hydra/Controller/Root.pm at line 40
    [15.52]
    [16.0]
    if ($c->stash->{isPrivateHydra} && ! noLoginNeeded($c)) {
    requireUser($c);
    }
  • edit in src/root/topbar.tt at line 9
    [3.10980]
    [3.11121]
    [% showPrivate = (isPrivateHydra && c.user_exists) || ! isPrivateHydra %]
  • edit in src/root/topbar.tt at line 11
    [3.11122]
    [3.4115]
    [% IF showPrivate %]
  • edit in src/root/topbar.tt at line 115
    [3.2753]
    [3.15871]
    [% END %]
  • edit in src/root/topbar.tt at line 118
    [3.42][3.15884:15885](),[3.2779][3.15884:15885](),[3.4301][3.15884:15885](),[3.15884][3.15884:15885](),[3.15885][3.2780:2847](),[3.2847][3.4302:4439](),[3.144][3.2940:2950](),[3.4439][3.2940:2950](),[3.2940][3.2940:2950]()
    <form class="navbar-search" action="[% c.uri_for('/search') %]">
    <input name="query" type="text" class="search-query span2" placeholder="Search" [% HTML.attributes(value => c.req.params.query) %]/>
    </form>
  • edit in src/root/topbar.tt at line 119
    [3.3254]
    [3.43]
    [% IF showPrivate %]
    <form class="navbar-search" action="[% c.uri_for('/search') %]">
    <input name="query" type="text" class="search-query span2" placeholder="Search" [% HTML.attributes(value => c.req.params.query) %]/>
    </form>
    [% END %]