Removed privilege overrides.
This commit is contained in:
parent
918da0ac3d
commit
ad66fc2b0b
8 changed files with 38 additions and 32 deletions
|
|
@ -53,7 +53,7 @@ sub _submenu {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_copyTemplate {
|
||||
my (%template);
|
||||
if (WebGUI::Privilege::isInGroup($session{setting}{templateManagersGroup})) {
|
||||
if (WebGUI::Privilege::isInGroup(8)) {
|
||||
%template = WebGUI::SQL->quickHash("select * from template where templateId=$session{form}{tid} and namespace=".quote($session{form}{namespace}));
|
||||
WebGUI::SQL->write("insert into template (templateId,name,template,namespace)
|
||||
values (".getNextId("templateId").",
|
||||
|
|
@ -70,7 +70,7 @@ sub www_deleteTemplate {
|
|||
my ($output);
|
||||
if ($session{form}{tid} < 1000 && $session{form}{tid} > 0) {
|
||||
return WebGUI::Privilege::vitalComponent();
|
||||
} elsif (WebGUI::Privilege::isInGroup($session{setting}{templateManagersGroup})) {
|
||||
} elsif (WebGUI::Privilege::isInGroup(8)) {
|
||||
$output .= helpIcon(35);
|
||||
$output .= '<h1>'.WebGUI::International::get(42).'</h1>';
|
||||
$output .= WebGUI::International::get(502).'<p>';
|
||||
|
|
@ -91,7 +91,7 @@ sub www_deleteTemplateConfirm {
|
|||
my ($a, $pageId);
|
||||
if ($session{form}{tid} < 1000 && $session{form}{tid} > 1000) {
|
||||
return WebGUI::Privilege::vitalComponent();
|
||||
} elsif (WebGUI::Privilege::isInGroup($session{setting}{templateManagersGroup})) {
|
||||
} elsif (WebGUI::Privilege::isInGroup(8)) {
|
||||
if ($session{form}{namespace} eq "Page") {
|
||||
$a = WebGUI::SQL->read("select * from page where templateId=".$session{form}{tid});
|
||||
while (($pageId) = $a->array) {
|
||||
|
|
@ -112,7 +112,7 @@ sub www_deleteTemplateConfirm {
|
|||
sub www_editTemplate {
|
||||
my ($output, $namespaces, %template, $f);
|
||||
tie %template, 'Tie::CPHash';
|
||||
if (WebGUI::Privilege::isInGroup($session{setting}{templateManagersGroup})) {
|
||||
if (WebGUI::Privilege::isInGroup(8)) {
|
||||
if ($session{form}{tid} eq "new" || $session{form}{tid} eq "") {
|
||||
if ($session{form}{namespace} eq "Page") {
|
||||
$template{template} = "<table>\n <tr>\n <td>\n\n<tmpl_var page.position1>\n\n".
|
||||
|
|
@ -155,7 +155,7 @@ sub www_editTemplate {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_editTemplateSave {
|
||||
if (WebGUI::Privilege::isInGroup($session{setting}{templateManagersGroup})) {
|
||||
if (WebGUI::Privilege::isInGroup(8)) {
|
||||
if ($session{form}{tid} eq "new") {
|
||||
($session{form}{tid}) = WebGUI::SQL->quickArray("select max(templateId)
|
||||
from template where namespace=".quote($session{form}{namespace}));
|
||||
|
|
@ -186,7 +186,7 @@ sub www_editTemplateSave {
|
|||
#-------------------------------------------------------------------
|
||||
sub www_listTemplates {
|
||||
my ($output, $sth, @data, @row, $i, $p, $where);
|
||||
if (WebGUI::Privilege::isInGroup($session{setting}{templateManagersGroup})) {
|
||||
if (WebGUI::Privilege::isInGroup(8)) {
|
||||
$where = "where namespace=".quote($session{form}{namespace}) if ($session{form}{namespace});
|
||||
$output = helpIcon(33);
|
||||
$output .= '<h1>'.WebGUI::International::get(506).'</h1>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue