Admins can now own pages, and an admin cannot remove him/herself from the admins group.
This commit is contained in:
parent
bd0bf20710
commit
a651fadd0b
2 changed files with 5 additions and 2 deletions
|
|
@ -184,7 +184,8 @@ sub www_editPage {
|
|||
$f->date("startDate",WebGUI::International::get(497),$page{startDate});
|
||||
$f->date("endDate",WebGUI::International::get(498),$page{endDate});
|
||||
%hash = WebGUI::SQL->buildHash("select users.userId,users.username from users,groupings
|
||||
where groupings.groupId=4 and groupings.userId=users.userId order by users.username");
|
||||
where (groupings.groupId=4 or groupings.groupId=3) and groupings.userId=users.userId
|
||||
order by users.username");
|
||||
$f->select("ownerId",\%hash,WebGUI::International::get(108),[$page{ownerId}],'','','',
|
||||
' <a href="'.WebGUI::URL::page('op=listUsers').'">'.WebGUI::International::get(7).'</a>');
|
||||
$f->yesNo("ownerView",WebGUI::International::get(109),$page{ownerView});
|
||||
|
|
|
|||
|
|
@ -136,7 +136,9 @@ sub www_becomeUser {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_deleteGrouping {
|
||||
my ($u);
|
||||
if (WebGUI::Privilege::isInGroup(3)) {
|
||||
if ($session{user}{userId} == $session{form}{uid} && $session{form}{gid} == 3) {
|
||||
return WebGUI::Privilege::vitalComponent();
|
||||
} elsif (WebGUI::Privilege::isInGroup(3)) {
|
||||
$u = WebGUI::User->new($session{form}{uid});
|
||||
$u->deleteFromGroups([$session{form}{gid}]);
|
||||
return www_editUserGroup();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue