OK <%INIT> $m->abort(400) if grep !length, $user, $password, $uri, $method; my $CurrentUser = RT::CurrentUser->new; $CurrentUser->Load($user); $CurrentUser->Id or $m->abort(401); $CurrentUser->IsPassword($password) or $m->abort(401); $uri =~ m{(?:/repos/)?([^/]+)} or $m->abort(404); my $UnixName = $1; my $QueueObj = RT::Queue->new($RT::SystemUser); $QueueObj->LoadByUnixName($UnixName); $QueueObj->Id or $m->abort(404); if ($method !~ /^(?:GET|HEAD|PROPFIND|OPTIONS|REPORT)$/) { # Only allow commit on projects with writable SVN ($QueueObj->OriginObj->CustomFieldValue('VCS') eq 'svn') or $m->abort(403); if ($user ne 'root') { my $PrincipalObj = $CurrentUser->UserObj->PrincipalObj; $QueueObj->AdminCc->HasMember($PrincipalObj) or $QueueObj->Cc->HasMember($PrincipalObj) or $m->abort(403); } } <%ARGS> $user => '' $password => '' $uri => '' $method => '' <%FLAGS> inherit => undef