Correctly redirect to the referring page when logging in

[?]
Feb 21, 2013, 1:38 PM
LC64D4PUSQEVB7F6JKIP4HKJUZQN3POCJ5NCTTL3VRX3VT6J4AQQC

Dependencies

  • [2] CHCVBZ3W * Slight cleanup.
  • [3] PZL3SZM3 Give every page a consistent title
  • [4] JARRBLZD Bootstrapify the Hydra forms (except the project and jobset edit pages)
  • [5] S66BOMVU * Added authentication.
  • [6] 5NO7NCKT * Refactoring.
  • [7] JLDUSNUO * Unify rendering of finished and scheduled builds.
  • [8] RU7AQO7U * Role-based access control. Only admins can create projects. Only
  • [9] A52HEFHQ * Allow builds to be restarted (if they failed with a transient error,
  • [10] N45RZUQ6 Reduce I/O in build listings by only fetching required columns
  • [11] BN2MO2MP fix redirect after login
  • [12] YJYBKPZ5 Hydra/33: 'Sign in' should return to the referring page
  • [*] J5UVLXOK * Start of a basic Catalyst web interface.
  • [*] 6KJXJB7N qualify ordery_by clauses when necessary, remove unnecessary order_by's, reported by Ludo, resulted in errors in sqlite
  • [*] LBNVQXUB * Build the /build stuff in a separate controller.

Change contents

  • replacement in src/lib/Hydra/Controller/Root.pm at line 46
    [4.56][2.0:80]()
    if ($username eq "" && $password eq "" && ! defined $c->flash->{referer}) {
    [4.56]
    [2.80]
    if ($username eq "" && $password eq "" && !defined $c->flash->{referer}) {
  • edit in src/lib/Hydra/Controller/Root.pm at line 60
    [4.1022]
    [15.493]
    $c->keep_flash("referer");
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 100
    [4.1197][4.1197:1245]()
    $c->flash->{afterLogin} = $c->request->uri;
  • replacement in src/root/login.tt at line 13
    [4.4709][4.9886:10078]()
    <fieldset>
    <div class="control-group">
    <label class="control-label">User name</label>
    <div class="controls">
    <input type="text" class="span3" name="username" value=""></input>
    [4.4709]
    [4.10078]
    <fieldset>
    <div class="control-group">
    <label class="control-label">User name</label>
    <div class="controls">
    <input type="text" class="span3" name="username" value=""></input>
    </div>
  • edit in src/root/login.tt at line 20
    [4.10089][4.10089:10098]()
    </div>
  • replacement in src/root/login.tt at line 21
    [4.4781][4.10099:10283]()
    <div class="control-group">
    <label class="control-label">Password</label>
    <div class="controls">
    <input type="password" class="span3" name="password" value=""></input>
    [4.4781]
    [4.10283]
    <div class="control-group">
    <label class="control-label">Password</label>
    <div class="controls">
    <input type="password" class="span3" name="password" value=""></input>
    </div>
  • edit in src/root/login.tt at line 27
    [4.10294][4.10294:10303]()
    </div>
  • replacement in src/root/login.tt at line 28
    [4.4838][4.10304:10333](),[4.10333][3.3534:3615](),[3.3615][4.10412:10421](),[4.10412][4.10412:10421]()
    <div class="form-actions">
    <input type="submit" name="login" value="Sign in" class="btn btn-primary" />
    </div>
    [4.4838]
    [4.5190]
    <div class="form-actions">
    <input type="submit" name="login" value="Sign in" class="btn btn-primary" />
    </div>
    </fieldset>