being in admins group automatically results in a ui level great enough to see everything
This commit is contained in:
parent
fa678a65fa
commit
debd4e8c82
3 changed files with 12 additions and 2 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
6.7.0
|
6.7.0
|
||||||
|
- Being in the admins group automatically results in a UI level capable of
|
||||||
|
seeing everything.
|
||||||
- Fixed a potential problem where editing a page under rare very rare
|
- Fixed a potential problem where editing a page under rare very rare
|
||||||
conditions could destroy the not found page.
|
conditions could destroy the not found page.
|
||||||
- Added the ability to override the UI Level of any field in the edit form of
|
- Added the ability to override the UI Level of any field in the edit form of
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,7 @@ sub getAssetAdderLinks {
|
||||||
if ($@) {
|
if ($@) {
|
||||||
WebGUI::ErrorHandler::error("Couldn't get UI level of ".$class." because ".$@);
|
WebGUI::ErrorHandler::error("Couldn't get UI level of ".$class." because ".$@);
|
||||||
} else {
|
} else {
|
||||||
next if ($uiLevel > $session{user}{uiLevel});
|
next if ($uiLevel > $session{user}{uiLevel} || WebGUI::Grouping::isInGroup(3));
|
||||||
}
|
}
|
||||||
my $canAdd = eval{$class->canAdd()};
|
my $canAdd = eval{$class->canAdd()};
|
||||||
if ($@) {
|
if ($@) {
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ package WebGUI::Form::Control;
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
use WebGUI::Grouping;
|
||||||
use WebGUI::Session;
|
use WebGUI::Session;
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
@ -400,7 +401,14 @@ Renders the form field to HTML as a table row complete with labels, subtext, hov
|
||||||
|
|
||||||
sub toHtmlWithWrapper {
|
sub toHtmlWithWrapper {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
if ($self->{uiLevel} <= $session{user}{uiLevel} && $session{config}{$self->{uiLevelOverride}."_uiLevel"}{$self->{name}} <= $session{user}{uiLevel}) {
|
my $passUiLevelCheck = 0;
|
||||||
|
if ($session{config}{$self->{uiLevelOverride}."_uiLevel"}{$self->{name}}) { # use override if it exists
|
||||||
|
$passUiLevelCheck = ($session{config}{$self->{uiLevelOverride}."_uiLevel"}{$self->{name}} <= $session{user}{uiLevel});
|
||||||
|
} else { # use programmed default
|
||||||
|
$passUiLevelCheck = ($self->{uiLevel} <= $session{user}{uiLevel});
|
||||||
|
}
|
||||||
|
$passUiLevelCheck = WebGUI::Grouping::isInGroup(3) unless ($passUiLevelCheck); # override if in admins group
|
||||||
|
if ($passUiLevelCheck) {
|
||||||
my $rowClass = $self->{rowClass};
|
my $rowClass = $self->{rowClass};
|
||||||
$rowClass = qq| class="$rowClass" | if($self->{rowClass});
|
$rowClass = qq| class="$rowClass" | if($self->{rowClass});
|
||||||
my $labelClass = $self->{labelClass};
|
my $labelClass = $self->{labelClass};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue