Store the account type ("hydra" or "persona") explicitly in the database

[?]
Nov 5, 2013, 10:46 AM
D44B24QC6NCED6DVUYP2IJJEVBG2JNBKPBRRSLI5UXQTKA23DJQQC

Dependencies

  • [2] VVRM3EGC Link to both the Persona and legacy sign in
  • [3] SYLVCTT6 Start api cleanup with the User model
  • [4] LCLCU6FN Don't show a password reset button for Persona accounts
  • [5] SB2V735V Keep track of the database schema version
  • [6] JARRBLZD Bootstrapify the Hydra forms (except the project and jobset edit pages)
  • [7] OEPUOUNB Using twitter bootstrap for more consistent looks for Hydra
  • [8] 36ZTCZ4F Add basic Persona support
  • [9] KSBB33RE Add a dashboard
  • [10] KN3VYE5P * Cleaned up the foreign key constraints.
  • [11] LSZLZHJY Allow users to edit their own settings
  • [12] ZDENAYQI * email notification of evaluation errors to project owner (if desired)
  • [13] DV43UILU Don't float the search bar to the right in collapsed mode
  • [14] LZVO64YG Merge in the first bits of the API work
  • [15] XUKHBDR5 Prevent Persona users from setting a password
  • [16] PFB5ZUQW Fix legacy login
  • [17] J5UVLXOK * Start of a basic Catalyst web interface.
  • [18] XMB4MTRL Show sign in as success
  • [19] ZWCTAZGL added newsitems, added some admin options to clear various caches.
  • [20] Y6AHH4TH Remove the logfile and logSize columns from the database
  • [21] XJRJ4J7M Add user registration
  • [22] 2G63HKCH Fix some wellformedness issues
  • [*] S66BOMVU * Added authentication.
  • [*] QL55ECJ6 - adapted ui for hydra, more in line with nixos.org website
  • [*] 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 94
    [5.953]
    [5.953]
    , type => "persona"
  • edit in src/lib/Hydra/Controller/User.pm at line 167
    [5.3014]
    [5.3014]
    , type => "hydra"
  • replacement in src/lib/Hydra/Controller/User.pm at line 250
    [5.25913][5.121:207]()
    error($c, "This user's password cannot be reset.") if $user->password eq "!";
    [5.25913]
    [5.2427]
    error($c, "This user's password cannot be reset.") if $user->type ne "hydra";
  • replacement in src/lib/Hydra/Controller/User.pm at line 279
    [5.26111][5.208:265]()
    if ($user->password ne "!" && $password ne "") {
    [5.26111]
    [5.3455]
    if ($user->type eq "hydra" && $password ne "") {
  • edit in src/lib/Hydra/Schema/Users.pm at line 62
    [5.5700]
    [5.5700]
    is_nullable: 0
    =head2 type
    data_type: 'text'
    default_value: 'hydra'
  • edit in src/lib/Hydra/Schema/Users.pm at line 83
    [5.29898]
    [5.6337]
    "type",
    { data_type => "text", default_value => "hydra", is_nullable => 0 },
  • replacement in src/lib/Hydra/Schema/Users.pm at line 187
    [5.8787][5.5356:5498]()
    # Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-10-14 15:46:29
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Hv9Ukqud0d3uIUot0ErKeg
    [5.8787]
    [3.1838]
    # Created by DBIx::Class::Schema::Loader v0.07033 @ 2013-11-05 10:22:03
    # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Gd8KwFcnVShZ/WihvwfgQw
  • replacement in src/root/layout.tt at line 99
    [5.9312][5.83:159]()
    You are signed in as <tt>[% HTML.escape(c.user.username) %]</tt>.
    [5.9312]
    [5.9375]
    You are signed in as <tt>[% HTML.escape(c.user.username) %]</tt>[% IF c.user.type == 'persona' %] via Persona[% END %].
  • replacement in src/root/layout.tt at line 116
    [5.7486][5.472:525]()
    [% IF c.user_exists && c.user.password != '!' %]
    [5.7486]
    [5.525]
    [% IF c.user_exists && c.user.type == 'hydra' %]
  • replacement in src/root/topbar.tt at line 131
    [2.339][2.339:418]()
    <a href="[% c.uri_for('/login') %]">Sign in with a Hydra user name</a>
    [2.339]
    [2.418]
    <a href="[% c.uri_for('/login') %]">Sign in with a Hydra account</a>
  • replacement in src/root/user.tt at line 37
    [5.5437][5.340:385]()
    [% IF !create && user.password != '!' %]
    [5.5437]
    [5.5437]
    [% IF !create && user.type == 'hydra' %]
  • replacement in src/root/user.tt at line 104
    [5.7453][4.133:211]()
    [% IF !create && c.check_user_roles('admin') && user.password != '!' %]
    [5.7453]
    [5.5647]
    [% IF !create && c.check_user_roles('admin') && user.type == 'hydra' %]
  • replacement in src/sql/hydra.sql at line 12
    [5.1571][5.1571:1616]()
    emailOnError integer not null default 0
    [5.1571]
    [5.4131]
    emailOnError integer not null default 0,
    type text not null default 'hydra' -- either "hydra" or "persona"
  • file addition: upgrade-25.sql (----------)
    [28.3004]
    alter table Users add column type text not null default 'hydra';