All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 6052927b authored by Chad Barb's avatar Chad Barb

Approveuser now does not allow non-project-owners to approve people as
group_root into the default group.

Modified editgroup form to show only valid trust options for "add users"
table.
parent 24940013
......@@ -96,6 +96,14 @@ while (list ($header, $value) = each ($HTTP_POST_VARS)) {
USERERROR("You are not allowed to approve users in ".
"$project/$group!", 1);
}
TBProjLeader($project, $projleader);
if (strcmp($uid, $projleader) &&
strcmp($newtrust, "group_root") == 0 &&
strcmp($group, $project) == 0) {
USERERROR("You do not have permission to add new users with group ".
"root status to the default group!", 1);
}
#
# Check if already approved in the project/group. If already an
......
......@@ -186,13 +186,24 @@ if ($grabusers && mysql_num_rows($nonmembers_result)) {
</td>\n";
echo " <td align=center>
<select name='$user\$\$trust'>
<option value='user'>User</option>
<option value='local_root'>Local Root</option>
<option value='group_root'>Group Root</option>\n";
<select name='$user\$\$trust'>\n";
if (TBCheckGroupTrustConsistency($user, $pid, $gid, "user", 0)) {
echo "<option value='user' " .
((strcmp($trust, "user") == 0) ? "selected" : "") .
">User</option>\n";
}
if (TBCheckGroupTrustConsistency($user, $pid, $gid, "local_root", 0)) {
echo "<option value='local_root' " .
((strcmp($trust, "local_root") == 0) ? "selected" : "") .
">Local Root</option>\n";
echo "<option value='group_root' " .
((strcmp($trust, "group_root") == 0) ? "selected" : "") .
">Group Root</option>\n";
}
echo " </select>
</td>\n";
</td>\n";
}
echo "</tr>\n";
}
......
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