Commit 5d2947a0 authored by Leigh B Stoller's avatar Leigh B Stoller

Fix permission check for project writable profiles.

parent c784d3e4
......@@ -85,9 +85,7 @@ function Do_Create()
$errors["errors"] = "Profile has been deleted!";
goto bad;
}
if (! ($profile->isCreator($this_user) ||
$profile->isLeader($this_user) ||
$profile->project_write() || !ISADMIN())) {
if (! $profile->CanEdit($this_user)) {
$errors["errors"] = "Not enough permission!";
goto bad;
}
......@@ -1535,6 +1533,8 @@ function Do_UpdateRepository()
}
}
elseif ($profile->script() == $blob["source"]) {
# The repo changed for some other reason, we want to record
# the repo hash/branch in the profile metadata.
if (UpdateMaster($profile, null, null)) {
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment