Clean up the authorization code a bit
[?]
Oct 14, 2013, 4:01 PM
LYVUXIGTAG74XXVIMRPO3YZGFVH4XAHA5HDXUFRH2VQ6H65ETY2QCDependencies
- [2]
SSMN5MPTRemove dead code - [3]
LZVO64YGMerge in the first bits of the API work - [4]
QTFVCDIFadded hide feature for project/jobset - [5]
LUPEGYR7Hydra: In case of failure, also show changes between last succesful build and the first failed build after this - [6]
SJN2QPWH* Big speed-up of the job status page and the channel generation (such - [7]
HPEG2RHVMerge the BuildResultInfo table into the Builds table - [8]
N45RZUQ6Reduce I/O in build listings by only fetching required columns - [9]
3PNG7NIBRemove trailing whitespace - [10]
NABL63FI* hydra: project members can do stuff that the owner can do - [11]
LBNVQXUB* Build the /build stuff in a separate controller. - [12]
U2ZK6LZ7Fix some warnings - [13]
LC64D4PUCorrectly redirect to the referring page when logging in - [14]
LSZLZHJYAllow users to edit their own settings - [15]
CS7T2XFI - [16]
XJRJ4J7MAdd user registration - [17]
5NO7NCKT* Refactoring. - [18]
A52HEFHQ* Allow builds to be restarted (if they failed with a transient error, - [19]
FPK5LF53* Put the project-related actions in a separate controller. Put the - [20]
KAZWI5G4* hydra: buildpage, show changes since last build/successful build - [21]
ODNCGFQ5* Improved the navigation bar: don't include all projects (since that - [22]
BHJ62LYE* Allow authorised users to create projects. - [23]
7UJ5YV4V* Provide a channel for each project containing all the latest
Change contents
- replacement in src/lib/Hydra/Controller/Project.pm at line 117
requireLogin($c) if !$c->user_exists;error($c, "Only administrators or authorised users can perform this operation.")requireUser($c);accessDenied($c, "Only administrators or authorised users can perform this operation.") - replacement in src/lib/Hydra/Controller/User.pm at line 153
requireLogin($c) if !$c->user_exists;requireUser($c); - replacement in src/lib/Hydra/Controller/User.pm at line 169
requireLogin($c) if !$c->user_exists;requireUser($c); - replacement in src/lib/Hydra/Controller/User.pm at line 171
error($c, "You do not have permission to edit other users.")accessDenied($c, "You do not have permission to edit other users.") - replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 18[2.70]→[4.9702:9721](∅→∅),[4.207]→[4.9702:9721](∅→∅),[4.268]→[4.9702:9721](∅→∅),[4.620]→[4.9702:9721](∅→∅),[4.1286]→[4.9702:9721](∅→∅),[4.1635]→[4.9702:9721](∅→∅),[4.4810]→[4.9702:9721](∅→∅),[4.9702]→[4.9702:9721](∅→∅),[4.9721]→[4.1595:1680](∅→∅)
error notFoundrequireLogin requireProjectOwner requireAdmin requirePost isAdmin isProjectOwnererror notFound accessDeniedforceLogin requireUser requireProjectOwner requireAdmin requirePost isAdmin isProjectOwner - edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 101
error($c, $msg);}sub accessDenied {my ($c, $msg) = @_;$c->response->status(403); - replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 120
sub requireLogin {sub forceLogin { - edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 125
}sub requireUser {my ($c) = @_;forceLogin($c) if !$c->user_exists; - replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 136
return $c->user_exists && ($c->check_user_roles('admin') || $c->user->username eq $project->owner->username || defined $c->model('DB::ProjectMembers')->find({ project => $project, userName => $c->user->username }));return$c->user_exists &&(isAdmin($c) ||$c->user->username eq $project->owner->username ||defined $c->model('DB::ProjectMembers')->find({ project => $project, userName => $c->user->username })); - replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 146[4.1387]→[4.2572:2573](∅→∅),[4.2573]→[4.1392:1434](∅→∅),[4.1392]→[4.1392:1434](∅→∅),[4.1434]→[4.0:89](∅→∅)
requireLogin($c) if !$c->user_exists;error($c, "Only the project members or administrators can perform this operation.")requireUser($c);accessDenied($c, "Only the project members or administrators can perform this operation.") - edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 154
- replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 160[4.11226]→[4.11226:11269](∅→∅),[4.11269]→[4.2574:2575](∅→∅),[4.2575]→[4.11274:11339](∅→∅),[4.11274]→[4.11274:11339](∅→∅)
requireLogin($c) if !$c->user_exists;error($c, "Only administrators can perform this operation.")requireUser($c);accessDenied($c, "Only administrators can perform this operation.")