Commit 0a1520b1 authored by Leigh Stoller's avatar Leigh Stoller

Allow the project leader to delete groups, even if they are not

in the group.
parent 004a9087
#!/usr/bin/perl -wT
#
# Copyright (c) 2005-2014 University of Utah and the Flux Group.
# Copyright (c) 2005-2015 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -740,6 +740,15 @@ sub AccessCheck($$$)
}
elsif ($access_type == TB_PROJECT_MAKEGROUP() ||
$access_type == TB_PROJECT_DELGROUP()) {
#
# Project leader can always do this
#
if ($access_type == TB_PROJECT_DELGROUP()) {
my $project = $self->GetProject();
my $leader = $self->GetLeader();
return 1
if ($user->SameUser($leader));
}
$mintrust = PROJMEMBERTRUST_GROUPROOT();
}
elsif ($access_type == TB_PROJECT_LEADGROUP()) {
......
<?php
#
# Copyright (c) 2006-2014 University of Utah and the Flux Group.
# Copyright (c) 2006-2015 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -358,6 +358,13 @@ class Group
}
elseif ($access_type == $TB_PROJECT_MAKEGROUP ||
$access_type == $TB_PROJECT_DELGROUP) {
if ($access_type == $TB_PROJECT_DELGROUP) {
$project = $this->Project();
$leader = $this->GetLeader();
if ($user->SameUser($leader)) {
return 1;
}
}
$mintrust = $TBDB_TRUST_GROUPROOT;
}
elseif ($access_type == $TB_PROJECT_LEADGROUP) {
......
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