Allow public dashboards

[?]
May 27, 2016, 10:00 AM
BKMQXGBOQIANQGBI3JMMVE3CA32SJF2MI4XMXAJA3EWZ2MYPZDTQC

Dependencies

  • [2] 4AKMU4ZB Clean up user editing
  • [3] ZB3JV52W Add a "My jobsets" tab to the dashboard
  • [4] PF72JKWQ Add a "My jobs" tab to the dashboard
  • [5] ZDENAYQI * email notification of evaluation errors to project owner (if desired)
  • [6] SB2V735V Keep track of the database schema version
  • [7] CGVHVQOJ In the "My jobs" tab, ignore disabled projects/jobsets
  • [8] XJRJ4J7M Add user registration
  • [9] KN3VYE5P * Cleaned up the foreign key constraints.
  • [10] SYLVCTT6 Start api cleanup with the User model
  • [11] D44B24QC Store the account type ("hydra" or "persona") explicitly in the database
  • [12] LZVO64YG Merge in the first bits of the API work
  • [13] Y6AHH4TH Remove the logfile and logSize columns from the database
  • [14] KSBB33RE Add a dashboard
  • [*] MQMF2LBW Re-enable adding new users via the web interface
  • [*] S66BOMVU * Added authentication.
  • [*] ZWCTAZGL added newsitems, added some admin options to clear various caches.
  • [*] SZYDW2DG hydra: added some user admin
  • [*] N22GPKYT * Put info about logs / build products in the DB.
  • [*] D5QIOJGP * Move everything up one directory.

Change contents

  • edit in src/lib/Hydra/Controller/User.pm at line 232
    [16.1393]
    [16.1393]
    , publicdashboard => $c->stash->{params}->{"publicdashboard"} ? 1 : 0
  • replacement in src/lib/Hydra/Controller/User.pm at line 340
    [4.3416][4.731:773]()
    sub dashboard :Chained('user') :Args(0) {
    [4.3416]
    [4.773]
    sub dashboard_old :Chained('user') :PathPart('dashboard') :Args(0) {
    my ($self, $c) = @_;
    $c->res->redirect($c->uri_for($self->action_for("dashboard"), $c->req->captures));
    }
    sub dashboard_base :Chained('/') PathPart('dashboard') CaptureArgs(1) {
    my ($self, $c, $userName) = @_;
    $c->stash->{user} = $c->model('DB::Users')->find($userName)
    or notFound($c, "User $userName doesn't exist.");
    accessDenied($c, "You do not have permission to view this dashboard.")
    unless $c->stash->{user}->publicdashboard ||
    (defined $c->user && ($userName eq $c->user->username || !isAdmin($c)));
    }
    sub dashboard :Chained('dashboard_base') :PathPart('') :Args(0) {
  • replacement in src/lib/Hydra/Controller/User.pm at line 373
    [4.2][4.2:71]()
    sub my_jobs_tab :Chained('user') :PathPart('my-jobs-tab') :Args(0) {
    [4.2]
    [4.71]
    sub my_jobs_tab :Chained('dashboard_base') :PathPart('my-jobs-tab') :Args(0) {
  • replacement in src/lib/Hydra/Controller/User.pm at line 392
    [3.4][3.4:79]()
    sub my_jobsets_tab :Chained('user') :PathPart('my-jobsets-tab') :Args(0) {
    [3.4]
    [3.79]
    sub my_jobsets_tab :Chained('dashboard_base') :PathPart('my-jobsets-tab') :Args(0) {
  • edit in src/lib/Hydra/Schema/Users.pm at line 68
    [4.285]
    [18.5700]
    is_nullable: 0
    =head2 publicdashboard
    data_type: 'boolean'
    default_value: false
  • edit in src/lib/Hydra/Schema/Users.pm at line 91
    [4.367]
    [18.6337]
    "publicdashboard",
    { data_type => "boolean", default_value => \"false", is_nullable => 0 },
  • replacement in src/lib/Hydra/Schema/Users.pm at line 195
    [4.8787][4.368:510]()
    # Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-11-05 10:22:03
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Gd8KwFcnVShZ/WihvwfgQw
    [4.8787]
    [4.1838]
    # Created by DBIx::Class::Schema::Loader v0.07043 @ 2016-05-27 11:32:14
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Az1+V+ztJoWUt50NLQR3xg
  • edit in src/root/user.tt at line 64
    [2.2811]
    [16.2171]
    </label>
    </div>
    </div>
    <div class="control-group">
    <div class="controls">
    <label class="checkbox">
    <input type="checkbox" name="publicdashboard" [% IF !create && user.publicdashboard; 'checked="checked"'; END %]/>Public dashboard
  • replacement in src/sql/hydra.sql at line 13
    [4.945][4.945:1024]()
    type text not null default 'hydra' -- either "hydra" or "persona"
    [4.945]
    [4.4131]
    type text not null default 'hydra', -- either "hydra" or "persona"
    publicDashboard boolean not null default false
  • file addition: upgrade-49.sql (----------)
    [21.3004]
    alter table Users add column publicDashboard boolean not null default false;