Add a restart-jobs role
[?]
Dec 30, 2017, 1:28 PM
JO75HQLOPQKFJ4PGB4R3RMOR5A4XG3QDKLKYI7IV2HUQ347MCARACDependencies
- [2]
XZKO4FNRuser: Fix spelling of create-projects role. - [3]
MNKXBLNCReturn 410 Gone (rather than 500) if an output is no longer available - [4]
AR5EHCUFAdd action to restart all failed builds in an eval - [5]
VHV6GI4LAdd a jobset eval action to restart all aborted/cancelled builds - [6]
YQFIBA4JRestart builds failed due to unsupported system type - [7]
N45RZUQ6Reduce I/O in build listings by only fetching required columns - [8]
2CZSW5S5Don't redirect to /login if authentication is required - [9]
6S3ZLOZLReturn JSON for /eval - [10]
SSMN5MPTRemove dead code - [11]
FPK5LF53* Put the project-related actions in a separate controller. Put the - [12]
TNIHMBCRJobset.pm: Factor out build->eval mapping. - [13]
QTFVCDIFadded hide feature for project/jobset - [14]
A52HEFHQ* Allow builds to be restarted (if they failed with a transient error, - [15]
LYVUXIGTClean up the authorization code a bit - [*]
U4TD3AIQAdd support for viewing jobset evaluations - [*]
LBNVQXUB* Build the /build stuff in a separate controller. - [*]
SZYDW2DGhydra: added some user admin - [*]
XJRJ4J7MAdd user registration
Change contents
- replacement in src/lib/Hydra/Controller/JobsetEval.pm at line 191
requireProjectOwner($c, $c->stash->{eval}->project);requireRestartPrivileges($c, $c->stash->{eval}->project); - replacement in src/lib/Hydra/Helper/CatalystUtils.pm at line 15
forceLogin requireUser requireProjectOwner requireAdmin requirePost isAdmin isProjectOwnerforceLogin requireUser requireProjectOwner requireRestartPrivileges requireAdmin requirePost isAdmin isProjectOwner - edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 174
- edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 182
}sub hasRestartJobsRole {my ($c) = @_;return $c->user_exists && $c->check_user_roles('restart-jobs');}sub mayRestartJobs {my ($c, $project) = @_;return$c->user_exists &&(isAdmin($c) ||hasRestartJobsRole($c) ||isProjectOwner($c, $project)); - edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 198
sub requireRestartPrivileges {my ($c, $project) = @_;requireUser($c);accessDenied($c, "Only the project members, administrators, and accounts with restart-jobs privileges can perform this operation.")unless mayRestartJobs($c, $project);} - edit in src/lib/Hydra/Helper/CatalystUtils.pm at line 218
- edit in src/root/user.tt at line 83[2.60][20.6750]
[% INCLUDE roleoption role="restart-jobs" %]