Allow users to edit their own settings

[?]
Mar 4, 2013, 2:25 PM
LSZLZHJYGXZTCNH4JUXU7W23MW5PBVM4OBMWRRVNEDROMIBUVQNAC

Dependencies

  • [2] F7S2EGV2 hydra: cannot change username, also update fullname
  • [3] 6ED5NSYT fix; resetting password used to send email to logged in user (typically admin), now to the user whose password is resetted
  • [4] CB33YUQL Use $c->config
  • [5] QIW2WZKW Fix indentation
  • [6] K22TMPH5 Make the info tables less compressed
  • [7] WYMEG4VP Make some more tables clickable
  • [8] EVZTBKEF Add simpler push support for GitHub
  • [9] XJRJ4J7M Add user registration
  • [10] HSVVEKTY * Start of a JSON API to get information about a specific build.
  • [11] AJKTRRDJ rename var
  • [12] I2WEO2VS fixed bug when updating user when no roles were selected, changed change-password link
  • [13] U4TD3AIQ Add support for viewing jobset evaluations
  • [14] ZWCTAZGL added newsitems, added some admin options to clear various caches.
  • [15] 5DSDXORD hydra: missing plain.tt
  • [16] PZL3SZM3 Give every page a consistent title
  • [17] 36M6DGIT Show the runtime/build dependencies in the build page
  • [18] FV2M6MOT hydra: use autoconf/-make
  • [19] JY7BXXOP Split viewing and editing a project
  • [20] OR5SJ42Y Show releases in a tab on the project page
  • [21] SZYDW2DG hydra: added some user admin
  • [22] QT4FO2HP refactored admin controller, using chains, to avoid using requireadmin on each endpoint
  • [23] SMCOU72F hydra: add some admin for adding/enabling/etc build machines
  • [24] WQXF2T3D hydra-evaluator: Don't require $HYDRA_CONFIG
  • [25] 7G7QH3IT Set a 500 HTTP status on errors
  • [26] HPEG2RHV Merge the BuildResultInfo table into the Builds table
  • [27] 75XUS62Y * Added a page to quickly see all failed builds and failed evaluations
  • [28] TH674WKJ add log diff to compare logs to previous builds
  • [29] 5D327YA3 Fix URL in the "password changed" email.
  • [30] IDT3SO3P Generate *.narinfo files on the fly to support the binary cache substituter
  • [31] FAZIT7T5 do not check username, as you are not allowed to change it
  • [32] SBKX3YH2 cleanup
  • [33] R2PON6R7 Allow non-admin users to see the machine status page
  • [34] JARRBLZD Bootstrapify the Hydra forms (except the project and jobset edit pages)
  • [35] NEQ4BISO Add bootstrap.zip
  • [36] SHYRGAWZ hydra: when no external url is given for diff's of git/hg input, revert to a diff done on a local available clone
  • [37] 6FRLEP4P first try for timeline of last 24 hours in hydra
  • [38] UICHT2PS Add a search feature
  • [39] 2BUX775I * More release -> view.
  • [40] KXGOUX7P * Creating releases.
  • [41] IK2KI6KZ Add create-user action that was mostly present already.
  • [42] AFEKITYD Fix some warnings about undefined values
  • [43] WRIU3S5E * UI for cloning builds (not functional yet).
  • [44] QTC3SYBM Jobset page: Load the jobs and status tabs on demand
  • [45] D5QIOJGP * Move everything up one directory.
  • [46] FHAVPTZ6 Hydra/23: added some X-headers with meta info in email notifications, added more descriptive status
  • [47] HRAFVVOE make logo configurable via HYDRA_LOGO env var
  • [48] HE3GX5IP Optimize fetch-git.
  • [49] J5UVLXOK * Start of a basic Catalyst web interface.
  • [50] OOZK3MF5 Show current query in the search box
  • [51] VH5ZABDR Add a page to show the latest evaluations for the entire server
  • [52] MVB7RRLT * Move NARs from the NixChannel controller to the Root controller and
  • [53] SMM4HQTP * Put actions related to builds under /build (e.g. /log/<buildid>
  • [54] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [55] P5X4P6VK * Renaming "release sets" to "views" (not finished yet). Having
  • [56] KA45EBF5 * Send email if a build fails.
  • [57] PALLP4UY is not in hydra-server's scope
  • [58] 2JQ7WEFM
  • [59] 3RL7VFKE Add tests for "git describe --long".
  • [60] OX6NYJDV Split viewing and editing a jobset
  • [61] NYC3LZKH * Generate NAR archives on the fly. Necessary for producing channels
  • [62] BKOIYITR added some json responses
  • [63] 4SFOPTHW Use query_params instead of params
  • [64] TRDGNILT Remove unused file
  • [65] XE6HD7BP Provide the nix-cache-info file required by the binary cache substituter
  • [66] QL55ECJ6 - adapted ui for hydra, more in line with nixos.org website
  • [67] LZYXZOLK * Add 'set -e' to all scm test setup scripts, to catch errors as early as possible
  • [68] 3PNG7NIB Remove trailing whitespace
  • [69] RSEGBU6C Hydra/20: Jobset clone feature
  • [70] XZ7ZIKCV * Allow overriding the sender email address.
  • [71] RBNQKATL * Adding persistant releases. A release is a named set of builds.
  • [72] AS2OXLRM * Editing releases.
  • [73] PCKLFRT5 Support push notification of repository changes
  • [74] FYO6NECE hydra
  • [75] SN2KFKSW use base_uri config in password reset email
  • [76] 3JBUMW3E forgot to commit a file
  • [77] XDDCO6CH * hydra: add dependency list with links to logfiles
  • [78] EFWN7JBV * Added a status page that shows all the currently executing build steps.
  • [79] SMTMFEKE hydra: add missing templates
  • [80] HX4QYOYA add first evaluations tests
  • [81] 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.
  • [*] CS7T2XFI
  • [*] 7DWCXNC7 Use the new Nix Perl bindings
  • [*] 5NO7NCKT * Refactoring.
  • [*] A52HEFHQ * Allow builds to be restarted (if they failed with a transient error,
  • [*] FPK5LF53 * Put the project-related actions in a separate controller. Put the
  • [*] 7YBYT2LQ

Change contents

  • edit in src/lib/Hydra/Controller/API.pm at line 24
    [10.370][10.11:238]()
    }
    sub end : ActionClass('RenderView') {
    my ($self, $c) = @_;
    if (scalar @{$c->error}) {
    $c->stash->{json}->{error} = join "\n", @{$c->error};
    $c->forward('View::JSON');
    $c->clear_errors;
    }
  • edit in src/lib/Hydra/Controller/API.pm at line 310
    [10.1440][8.11:43]()
    $c->forward('View::JSON');
  • replacement in src/lib/Hydra/Controller/API.pm at line 317
    [8.190][8.190:195]()
    [8.190]
    [8.195]
  • replacement in src/lib/Hydra/Controller/API.pm at line 322
    [8.428][8.428:433]()
    [8.428]
    [8.433]
  • edit in src/lib/Hydra/Controller/API.pm at line 328
    [8.781][10.1440:1472](),[10.1440][10.1440:1472]()
    $c->forward('View::JSON');
  • edit in src/lib/Hydra/Controller/Admin.pm at line 11
    [10.89][10.89:232]()
    use Crypt::RandPasswd;
    use Sys::Hostname::Long;
    use Email::Simple;
    use Email::Sender::Simple qw(sendmail);
    use Email::Sender::Transport::SMTP;
  • edit in src/lib/Hydra/Controller/Admin.pm at line 47
    [10.911][10.62:64](),[10.239][10.62:64](),[10.64][10.239:240](),[10.239][10.239:240](),[10.240][10.6:7](),[10.127][10.235:538](),[10.235][10.235:538](),[10.538][10.128:186](),[10.186][10.674:693](),[10.674][10.674:693](),[10.693][2.0:32](),[2.32][10.762:1005](),[10.762][10.762:1005](),[10.1005][10.187:197](),[10.197][10.1022:1035](),[10.1022][10.1022:1035](),[10.1035][10.0:72](),[10.72][10.198:204](),[10.204][10.1098:1100](),[10.1098][10.1098:1100](),[10.1100][10.12:131](),[10.131][10.0:67](),[10.67][10.1761:1790]()
    }
    sub updateUser {
    my ($c, $user) = @_;
    my $username = trim $c->request->params->{"username"};
    my $fullname = trim $c->request->params->{"fullname"};
    my $emailaddress = trim $c->request->params->{"emailaddress"};
    my $emailonerror = trim $c->request->params->{"emailonerror"};
    my $roles = $c->request->params->{"roles"} ;
    $user->update(
    { fullname => $fullname
    , emailaddress => $emailaddress
    , emailonerror => $emailonerror
    });
    $user->userroles->delete_all;
    if(ref($roles) eq 'ARRAY') {
    for my $s (@$roles) {
    $user->userroles->create({ role => $s}) ;
    }
    } else {
    $user->userroles->create({ role => $roles}) if defined $roles ;
    }
    }
    sub create_user : Chained('admin') PathPart('create-user') Args(0) {
    my ($self, $c) = @_;
    requireAdmin($c);
    $c->stash->{template} = 'user.tt';
    $c->stash->{edit} = 1;
    $c->stash->{create} = 1;
  • edit in src/lib/Hydra/Controller/Admin.pm at line 48
    [10.101][10.131:132](),[10.131][10.131:132](),[10.132][9.38:39](),[9.39][10.102:210](),[10.132][10.102:210]()
    sub create_user_submit : Chained('admin') PathPart('create-user/submit') Args(0) {
    my ($self, $c) = @_;
  • edit in src/lib/Hydra/Controller/Admin.pm at line 49
    [10.211][10.211:268]()
    my $username = trim $c->request->params->{username};
  • edit in src/lib/Hydra/Controller/Admin.pm at line 50
    [10.269][10.269:515](),[10.515][10.179:181](),[10.179][10.179:181](),[10.182][10.1100:1101](),[10.1100][10.1100:1101](),[10.1101][10.516:517](),[10.518][10.1101:1370](),[10.1101][10.1101:1370](),[10.1370][10.183:184](),[10.184][10.1370:1371](),[10.1370][10.1370:1371]()
    txn_do($c->model('DB')->schema, sub {
    my $user = $c->model('DB::Users')->create(
    {username => $username, emailaddress => "", password => ""});
    updateUser($c, $user);
    });
    $c->res->redirect("/admin/users");
    }
    sub user : Chained('admin') PathPart('user') CaptureArgs(1) {
    my ($self, $c, $username) = @_;
    requireAdmin($c);
    my $user = $c->model('DB::Users')->find($username)
    or notFound($c, "User $username doesn't exist.");
    $c->stash->{user} = $user;
    }
  • edit in src/lib/Hydra/Controller/Admin.pm at line 53
    [10.1542][10.1542:1543]()
  • edit in src/lib/Hydra/Controller/Admin.pm at line 57
    [10.186][10.1586:1740](),[10.1492][10.1586:1740](),[10.1740][10.187:188](),[10.188][10.1740:1897](),[10.1740][10.1740:1897](),[10.1897][10.189:367](),[10.367][10.1941:1949](),[10.1941][10.1941:1949](),[10.1949][10.1791:1792](),[10.373][10.1949:1990](),[10.1792][10.1949:1990](),[10.1949][10.1949:1990](),[10.1990][10.374:375](),[10.375][10.1990:2007](),[10.1990][10.1990:2007](),[10.2007][10.205:241](),[10.241][10.2047:2132](),[10.2047][10.2047:2132](),[10.2132][10.242:243](),[10.243][10.2136:2361](),[10.2136][10.2136:2361](),[10.2361][10.376:377](),[10.377][10.2361:2461](),[10.2361][10.2361:2461](),[10.82][10.82:83](),[10.83][10.2462:2536](),[10.2462][10.2462:2536](),[10.2536][10.244:245](),[10.245][10.2541:2692](),[10.2541][10.2541:2692](),[10.2692][3.0:41](),[3.41][10.2725:2855](),[10.278][10.2725:2855](),[10.2725][10.2725:2855](),[10.2855][4.0:98](),[10.87][10.2927:3008](),[10.94][10.2927:3008](),[4.98][10.2927:3008](),[10.161][10.2927:3008](),[10.2927][10.2927:3008](),[10.3008][10.378:379](),[10.379][10.3008:3009](),[10.3008][10.3008:3009]()
    sub user_edit : Chained('user') PathPart('edit') Args(0) {
    my ($self, $c) = @_;
    $c->stash->{template} = 'user.tt';
    $c->stash->{edit} = 1;
    }
    sub user_edit_submit : Chained('user') PathPart('submit') Args(0) {
    my ($self, $c) = @_;
    requirePost($c);
    txn_do($c->model('DB')->schema, sub {
    if (($c->request->params->{submit} || "") eq "delete") {
    $c->stash->{user}->delete;
    } else {
    updateUser($c, $c->stash->{user});
    }
    });
    $c->res->redirect("/admin/users");
    }
    sub sendemail {
    my ($to, $subject, $body) = @_;
    my $url = hostname_long;
    my $sender = ($ENV{'USER'} || "hydra") . "@" . $url;
    my $email = Email::Simple->create(
    header => [
    To => $to,
    From => "Hydra <$sender>",
    Subject => $subject
    ],
    body => $body
    );
    sendmail($email);
    }
    sub reset_password : Chained('user') PathPart('reset-password') Args(0) {
    my ($self, $c) = @_;
    # generate password
    my $password = Crypt::RandPasswd->word(8,10);
    # calculate hash
    my $hashed = sha1_hex($password);
    $c->stash->{user}-> update({ password => $hashed}) ;
    # send email
    sendemail(
    $c->stash->{user}->emailaddress,
    "New password for Hydra",
    "Hi,\n\n".
    "Your password has been reset. Your new password is '$password'.\n".
    "You can change your password at " . $c->config()->{'base_uri'} . "/change-password .\n".
    "With regards, Hydra\n"
    );
    $c->res->redirect("/admin/users");
    }
  • edit in src/lib/Hydra/Controller/Admin.pm at line 177
    [10.622]
    [10.5454]
  • replacement in src/lib/Hydra/Controller/Root.pm at line 159
    [10.403][10.1594:1625]()
    if (scalar @{$c->error}) {
    [10.403]
    [10.1625]
    if (defined $c->stash->{json}) {
    if (scalar @{$c->error}) {
    $c->stash->{json}->{error} = join "\n", @{$c->error};
    $c->clear_errors;
    }
    $c->forward('View::JSON');
    }
    elsif (scalar @{$c->error}) {
  • edit in src/lib/Hydra/Controller/Root.pm at line 227
    [10.265][10.299:356](),[10.356][10.3100:3125](),[10.3100][10.3100:3125](),[10.3125][10.776:777](),[10.777][10.3130:3172](),[10.3130][10.3130:3172](),[10.3172][10.778:829](),[10.829][10.3230:3232](),[10.3230][10.3230:3232](),[10.3232][10.266:267](),[10.267][10.3232:3330](),[10.3232][10.3232:3330](),[10.3330][10.830:831](),[10.831][10.3335:3377](),[10.3335][10.3335:3377](),[10.3377][10.832:887](),[10.887][10.3437:3673](),[10.3437][10.3437:3673](),[10.3673][10.888:889](),[10.889][10.3678:3763](),[10.3678][10.3678:3763](),[10.3763][10.890:919](),[10.919][10.3800:3802](),[10.3800][10.3800:3802](),[10.3802][10.684:685](),[10.684][10.684:685](),[10.685][10.268:269]()
    sub change_password : Path('change-password') :Args(0) {
    my ($self, $c) = @_;
    requireLogin($c) if !$c->user_exists;
    $c->stash->{template} = 'change-password.tt';
    }
    sub change_password_submit : Path('change-password/submit') : Args(0) {
    my ($self, $c) = @_;
    requireLogin($c) if !$c->user_exists;
    my $password = $c->request->params->{"password"};
    my $password_check = $c->request->params->{"password_check"};
    print STDERR "$password \n";
    print STDERR "$password_check \n";
    error($c, "Passwords did not match, go back and try again!") if $password ne $password_check;
    my $hashed = sha1_hex($password);
    $c->user->update({ password => $hashed}) ;
    $c->res->redirect("/");
    }
  • edit in src/lib/Hydra/Controller/User.pm at line 3
    [9.287]
    [9.287]
    use utf8;
  • edit in src/lib/Hydra/Controller/User.pm at line 7
    [9.346]
    [9.346]
    use Crypt::RandPasswd;
  • replacement in src/lib/Hydra/Controller/User.pm at line 22
    [9.640][9.640:719]()
    if ($username eq "" && $password eq "" && !defined $c->flash->{referer}) {
    [9.640]
    [9.719]
    if ($username eq "" && $password eq "" && !defined $c->session->{referer}) {
  • replacement in src/lib/Hydra/Controller/User.pm at line 24
    [9.759][9.759:871]()
    my $refurl = $c->request->referer;
    $c->flash->{referer} = $refurl if $refurl =~ m/^($baseurl)/;
    [9.759]
    [9.871]
    my $referer = $c->request->referer;
    $c->session->{referer} = $referer if defined $referer && $referer =~ m/^($baseurl)/;
  • replacement in src/lib/Hydra/Controller/User.pm at line 29
    [9.912][9.912:1142]()
    if ($c->authenticate({username => $username, password => $password})) {
    $c->response->redirect($c->flash->{referer} || $c->uri_for('/'));
    $c->flash->{referer} = undef;
    return;
    }
    [9.912]
    [9.1142]
    backToReferer($c) if $c->authenticate({username => $username, password => $password});
  • edit in src/lib/Hydra/Controller/User.pm at line 32
    [9.1209][9.1209:1241]()
    $c->keep_flash("referer");
  • edit in src/lib/Hydra/Controller/User.pm at line 50
    [9.1505]
    [9.1505]
    sub isValidPassword {
    my ($password) = @_;
    return length($password) >= 6;
    }
    sub setPassword {
    my ($user, $password) = @_;
    $user->update({ password => sha1_hex($password) });
    }
  • replacement in src/lib/Hydra/Controller/User.pm at line 92
    [9.2608][9.2608:2642]()
    if length($password) < 6;
    [9.2608]
    [9.2642]
    unless isValidPassword($password);
  • replacement in src/lib/Hydra/Controller/User.pm at line 101
    [9.2934][9.2934:2980]()
    , password => sha1_hex($password)
    [9.2934]
    [9.2980]
    , password => "!"
  • edit in src/lib/Hydra/Controller/User.pm at line 104
    [9.3030]
    [9.3030]
    setPassword($user, $password);
  • replacement in src/lib/Hydra/Controller/User.pm at line 107
    [9.3039][9.3039:3170]()
    $c->authenticate({username => $userName, password => $password})
    or error($c, "Unable to authenticate the new user!");
    [9.3039]
    [9.3170]
    unless ($c->user_exists) {
    $c->authenticate({username => $userName, password => $password})
    or error($c, "Unable to authenticate the new user!");
    }
  • replacement in src/lib/Hydra/Controller/User.pm at line 113
    [9.3246][9.3246:3316]()
    $c->response->redirect($c->flash->{referer} || $c->uri_for('/'));
    [9.3246]
    [9.3316]
    backToReferer($c);
    }
    sub user :Chained('/') PathPart('user') CaptureArgs(1) {
    my ($self, $c, $userName) = @_;
    requireLogin($c) if !$c->user_exists;
    error($c, "You do not have permission to edit other users.")
    if $userName ne $c->user->username && !isAdmin($c);
    $c->stash->{user} = $c->model('DB::Users')->find($userName)
    or notFound($c, "User $userName doesn't exist.");
  • replacement in src/lib/Hydra/Controller/User.pm at line 130
    [9.3320][9.3320:3353]()
    sub preferences :Local Args(0) {
    [9.3320]
    [9.3353]
    sub deleteUser {
    my ($self, $c, $user) = @_;
    my ($project) = $c->model('DB::Projects')->search({ owner => $user->username });
    error($c, "User " . $user->username . " is still owner of project " . $project->name . ".")
    if defined $project;
    $c->logout() if $user->username eq $c->user->username;
    $user->delete;
    }
    sub edit :Chained('user') Args(0) {
  • replacement in src/lib/Hydra/Controller/User.pm at line 142
    [9.3378][9.3378:3413]()
    error($c, "Not implemented.");
    [9.3378]
    [9.3413]
    my $user = $c->stash->{user};
    $c->stash->{template} = 'user.tt';
    $c->session->{referer} = $c->request->referer if !defined $c->session->{referer};
    if ($c->request->method ne "POST") {
    $c->stash->{fullname} = $user->fullname;
    $c->stash->{emailonerror} = $user->emailonerror;
    return;
    }
    if (($c->request->params->{submit} // "") eq "delete") {
    deleteUser($self, $c, $user);
    backToReferer($c);
    }
    if (($c->request->params->{submit} // "") eq "reset-password") {
    $c->stash->{json} = {};
    error($c, "No email address is set for this user.")
    unless $user->emailaddress;
    my $password = Crypt::RandPasswd->word(8,10);
    setPassword($user, $password);
    sendEmail($c,
    $user->emailaddress,
    "Hydra password reset",
    "Hi,\n\n".
    "Your password has been reset. Your new password is '$password'.\n\n".
    "You can change your password at " . $c->uri_for($self->action_for('edit'), [$user->username]) . ".\n\n".
    "With regards,\n\nHydra.\n"
    );
    return;
    }
    my $fullName = trim $c->req->params->{fullname};
    txn_do($c->model('DB')->schema, sub {
    error($c, "Your must specify your full name.") if $fullName eq "";
    $user->update(
    { fullname => $fullName
    , emailonerror => $c->request->params->{"emailonerror"} ? 1 : 0
    });
    my $password = $c->req->params->{password} // "";
    if ($password ne "") {
    error($c, "You must specify a password of at least 6 characters.")
    unless isValidPassword($password);
    error($c, "The passwords you specified did not match.")
    if $password ne trim $c->req->params->{password2};
    setPassword($user, $password);
    }
    if (isAdmin($c)) {
    $user->userroles->delete_all;
    $user->userroles->create({ role => $_})
    foreach paramToList($c, "roles");
    }
    });
    backToReferer($c);
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 7
    [84.106]
    [85.144]
    use Email::Simple;
    use Email::Sender::Simple qw(sendmail);
    use Email::Sender::Transport::SMTP;
    use Sys::Hostname::Long;
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 22
    [10.1657]
    [9.3453]
    sendEmail
    paramToList
    backToReferer
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 107
    [86.4358]
    [87.1160]
    sub backToReferer {
    my ($c) = @_;
    $c->response->redirect($c->session->{referer} || $c->uri_for('/'));
    $c->session->{referer} = undef;
    $c->detach;
    }
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 117
    [87.1197]
    [87.1245]
    $c->session->{referer} = $c->request->uri;
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 179
    [88.11462]
    [88.11462]
    sub sendEmail {
    my ($c, $to, $subject, $body) = @_;
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 184
    [88.11463]
    [88.11463]
    my $sender = $c->config->{'notification_sender'} ||
    (($ENV{'USER'} || "hydra") . "@" . hostname_long);
  • edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 187
    [88.11464]
    [84.184]
    my $email = Email::Simple->create(
    header => [
    To => $to,
    From => "Hydra <$sender>",
    Subject => $subject
    ],
    body => $body
    );
    print STDERR "Sending email:\n", $email->as_string if $ENV{'HYDRA_MAIL_TEST'};
    sendmail($email);
    }
    # Catalyst request parameters can be an array or a scalar or
    # undefined, making them annoying to handle. So this utility function
    # always returns a request parameter as a list.
    sub paramToList {
    my ($c, $name) = @_;
    my $x = $c->request->params->{$name};
    return () unless defined $x;
    return @$x if ref($x) eq 'ARRAY';
    return ($x);
    }
  • file deletion: change-password.tt (----------)
    [10.1486][10.4396:4438](),[10.4438][10.3804:3804]()
    [% WRAPPER layout.tt title="Change password" %]
    [% PROCESS common.tt %]
    <form action="[% c.uri_for('/change-password/submit') %]" method="post">
    <h2>Change password</h2>
    <tr>
    <th>Enter password:</th>
    <td><input type="password" class="string" id="password" name="password" /></td>
    </tr>
    <tr>
    <th>Enter password again:</th>
    <td><input type="password" class="string" id="password_check" name="password_check" /></td>
    </tr>
    </table>
    <p><button type="submit"><img src="/static/images/success.gif" />Change</button></p>
    </form>
    [% END %]
    <table class="info-table">
  • replacement in src/root/topbar.tt at line 205
    [10.3012][9.4410:4525]()
    [% INCLUDE makeLink uri = c.uri_for(c.controller('Root').action_for('preferences')) title = "Preferences" %]
    [10.3012]
    [10.3012]
    [% INCLUDE makeLink uri = c.uri_for(c.controller('User').action_for('edit'), [c.user.username]) title = "Preferences" %]
  • replacement in src/root/user.tt at line 1
    [10.4561][9.4526:4611]()
    [% WRAPPER layout.tt title=(create ? "Register new user" : "User $user.username") %]
    [10.4561]
    [10.4648]
    [% WRAPPER layout.tt title=(create ? "Register new user" : "Editing user $user.username") %]
  • replacement in src/root/user.tt at line 64
    [9.6222][9.6222:6356]()
    <input type="checkbox" name="enabled" [% IF 1; 'checked="checked"'; END %]></input>Receive evaluation error notifications
    [9.6222]
    [9.6356]
    <input type="checkbox" name="emailonerror" [% IF emailonerror; 'checked="checked"'; END %]></input>Receive evaluation error notifications
  • edit in src/root/user.tt at line 102
    [9.7453]
    [9.7453]
    [% IF !create && c.check_user_roles('admin') %]
    <button id="reset-password" type="submit" class="btn btn-warning" name="submit" value="reset-password">
    <i class="icon-trash icon-white"></i>
    Reset password
    </button>
    <script type="text/javascript">
    $("#reset-password").click(function() {
    bootbox.confirm(
    'Are you sure you want to reset the password for this user?',
    function(c) {
    if (!c) return;
    $.post("[% c.uri_for(c.controller('User').action_for('edit'), [user.username]) %]", { submit: 'reset-password' })
    .done(function(data) {
    if (data.error)
    bootbox.alert("Unable to reset password: " + data.error);
    else
    bootbox.alert("An email containing the new password has been sent to the user.");
    })
    .fail(function() { bootbox.alert("Server request failed!"); });
    });
    return false;
    });
    </script>
    [% END %]
  • edit in src/root/users.tt at line 12
    [7.1307][7.1307:1330]()
    <th>Options</th>
  • replacement in src/root/users.tt at line 17
    [7.1401][7.1401:1543]()
    <td><a class="row-link" href="[% c.uri_for(c.controller('Admin').action_for('user_edit'), [u.username]) %]">[% u.username %]</a></td>
    [7.1401]
    [7.1543]
    <td><a class="row-link" href="[% c.uri_for(c.controller('User').action_for('edit'), [u.username]) %]">[% u.username %]</a></td>
  • edit in src/root/users.tt at line 22
    [7.1757][7.1757:2004]()
    <td>[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('reset_password'), [u.username]) content = "Reset password" confirmmsg = "Are you sure you want to reset the password for this user?" class = "btn btn-mini" %]</td>
  • replacement in src/root/users.tt at line 27
    [10.7793][10.19786:19877]()
    <p><a class="btn" href="[% c.uri_for(c.controller('Admin').action_for('create_user')) %]">
    [10.7793]
    [10.19877]
    <p><a class="btn" href="[% c.uri_for(c.controller('Root').action_for('register')) %]">
  • replacement in src/script/hydra-build at line 117
    [10.662][10.0:34]()
    my $baseurl = hostname_long ;
    [10.662]
    [10.393]
    my $baseurl = hostname_long;
  • replacement in tests/Setup.pm at line 15
    [5.19][5.19:130]()
    $db->resultset('Users')->create({ username => "root", emailaddress => 'root@email.com', password => '' });
    [5.19]
    [10.0]
    $db->resultset('Users')->create({ username => "root", emailaddress => 'root@invalid.org', password => '' });
  • replacement in tests/jobs/bzr-update.sh at line 17
    [10.3584][10.3584:3642]()
    bzr whoami "build <build@donotemail.com>" -d bzr-repo
    [10.3584]
    [10.3642]
    bzr whoami "build <build@invalid.org>" -d bzr-repo