GC4LTHDIFUNBZET7CV6WDHA2JZ2VH4XBGLUR2R2ZOCLB2SJPU77QC
RU7AQO7U4HCWJNQTR2KRGDLLG24WYD47MWIHREV6SIAPCPDQHAWQC
GCHNNFZPCYM3BPOCU5GASALJ6ONWMEVEEGVD7KKLTWC7YQKJ5KZAC
2AUODJBTW2UJ47UB3SREZ7O7UTTJDQ4AGUQMPZAI4F3Y6BUF6LUQC
J5UVLXOK6EDIL5I7VKWH4V2QDS4DPD7FHRK6XBWSXFRQS4JKXFZQC
W6DC6K4INJQOJYR553ISCKZV7YIOGHEM3FZQPOLAPSZQ3KSJDMRQC
my $owner = trim $c->request->params->{owner}; die "Invalid owner: $owner" unless defined $c->model('DB::Users')->find({username => $owner});
my $owner = trim $c->request->params->{owner};
die "Invalid owner: $owner"
unless defined $c->model('DB::Users')->find({username => $owner});
$project->owner(trim($c->request->params->{owner})) if $c->check_user_roles('admin');
$project->owner(trim($c->request->params->{owner}))
if $c->check_user_roles('admin');
$project->owner($owner) if $c->check_user_roles('admin');
return error($c, "Only the project owner or the administrator can perform this operation.") unless $c->check_user_roles('admin') || $c->user->username eq $project->owner;
return error($c, "Only the project owner or the administrator can perform this operation.")
unless $c->check_user_roles('admin') || $c->user->username eq $project->owner;
if (!$c->check_user_roles('admin') && $c->user->username ne $project->owner) { return error($c, "Only the project owner or the administrator can perform this operation."); }
if (!$c->check_user_roles('admin') && $c->user->username ne $project->owner) {
return error($c, "Only the project owner or the administrator can perform this operation.");
}
if (!$c->check_user_roles('admin')) { return error($c, "Only administrators can create projects."); }
if (!$c->check_user_roles('admin')) {
return error($c, "Only administrators can create projects.");
return error($c, "Only administrators can create projects.") unless $c->check_user_roles('admin');
return error($c, "Only administrators can create projects.")
unless $c->check_user_roles('admin');