Merge branch 'WebGUI8' of github.com:plainblack/webgui into 8
Conflicts: lib/WebGUI.pm lib/WebGUI/Auth/WebGUI.pm sbin/findBrokenAssets.pl sbin/testEnvironment.pl
This commit is contained in:
commit
677ac978b6
89 changed files with 1064 additions and 448 deletions
|
|
@ -56,7 +56,7 @@ sub www_clickAd {
|
|||
my $id = $session->form->param("id");
|
||||
return undef unless $id;
|
||||
my $url = WebGUI::AdSpace->countClick($session, $id);
|
||||
$session->http->setRedirect($url);
|
||||
$session->response->setRedirect($url);
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ via WebGUI::Session::switchAdminOff()
|
|||
sub www_switchOffAdmin {
|
||||
my $session = shift;
|
||||
return "" unless ($session->user->canUseAdminMode);
|
||||
$session->http->setCacheControl("none");
|
||||
$session->response->setCacheControl("none");
|
||||
$session->switchAdminOff();
|
||||
return "";
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ If the current user is in the Turn On Admin Group, then allow them to turn on Ad
|
|||
sub www_switchOnAdmin {
|
||||
my $session = shift;
|
||||
return "" unless ($session->user->canUseAdminMode);
|
||||
$session->http->setCacheControl("none");
|
||||
$session->response->setCacheControl("none");
|
||||
$session->switchAdminOn();
|
||||
return "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ is returned.
|
|||
|
||||
sub www_auth {
|
||||
my $session = shift;
|
||||
$session->http->setCacheControl("none");
|
||||
$session->response->setCacheControl("none");
|
||||
my $auth;
|
||||
($auth) = $session->db->quickArray("select authMethod from users where username=".$session->db->quote($session->form->process("username"))) if($session->form->process("username"));
|
||||
my $authMethod = getInstance($session,$auth);
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ Checks to ensure the requestor is who we think it is, and then executes a cron j
|
|||
sub www_runCronJob {
|
||||
my $session = shift;
|
||||
$session->response->content_type("text/plain");
|
||||
$session->http->setCacheControl("none");
|
||||
$session->response->setCacheControl("none");
|
||||
unless (Net::CIDR::Lite->new(@{ $session->config->get('spectreSubnets') })->find($session->request->address) || canView($session)) {
|
||||
$session->log->security("make a Spectre cron job runner request, but we're only allowed to accept requests from ".join(",",@{$session->config->get("spectreSubnets")}).".");
|
||||
return "error";
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ sub www_editLDAPLinkSave {
|
|||
$properties->{ldapLoginTemplate} = $session->form->template("ldapLoginTemplate");
|
||||
$session->db->setRow("ldapLink","ldapLinkId",$properties);
|
||||
if($session->form->process("returnUrl")) {
|
||||
$session->http->setRedirect($session->form->process("returnUrl"));
|
||||
$session->response->setRedirect($session->form->process("returnUrl"));
|
||||
return undef;
|
||||
}
|
||||
return www_listLDAPLinks($session);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ Checks to ensure the requestor is who we think it is, and then returns a JSON st
|
|||
sub www_spectreGetSiteData {
|
||||
my $session = shift;
|
||||
$session->response->content_type("application/json");
|
||||
$session->http->setCacheControl("none");
|
||||
$session->response->setCacheControl("none");
|
||||
my %siteData = ();
|
||||
my $subnets = $session->config->get("spectreSubnets");
|
||||
if (!defined $subnets) {
|
||||
|
|
@ -117,7 +117,7 @@ sub www_spectreStatus {
|
|||
my $ac = WebGUI::AdminConsole->new($session, 'spectre');
|
||||
my $i18n = WebGUI::International->new($session, 'Spectre');
|
||||
|
||||
$session->http->setCacheControl("none");
|
||||
$session->response->setCacheControl("none");
|
||||
|
||||
my $remote = create_ikc_client(
|
||||
port=>$session->config->get("spectrePort"),
|
||||
|
|
@ -174,7 +174,7 @@ spectreSubnet, instead of checking the IP address of the spectre process.
|
|||
sub www_spectreTest {
|
||||
my $session = shift;
|
||||
$session->response->content_type("text/plain");
|
||||
$session->http->setCacheControl("none");
|
||||
$session->response->setCacheControl("none");
|
||||
|
||||
my $subnets = $session->config->get("spectreSubnets");
|
||||
if (!defined $subnets) {
|
||||
|
|
|
|||
|
|
@ -943,7 +943,7 @@ A reference to the current session.
|
|||
|
||||
sub www_formUsers {
|
||||
my $session = shift;
|
||||
$session->http->setCacheControl("none");
|
||||
$session->response->setCacheControl("none");
|
||||
return $session->privilege->insufficient() unless $session->user->isInGroup(12);
|
||||
$session->style->useEmptyStyle("1");
|
||||
my $output = getUserSearchForm($session,"formUsers",{formId=>$session->form->process("formId")},1);
|
||||
|
|
|
|||
|
|
@ -912,7 +912,7 @@ sub www_rollbackVersionTag {
|
|||
my $method = $session->form->process("proceed");
|
||||
$method = $method eq "manageCommittedVersions" ? $method : 'manageVersions';
|
||||
my $redir = WebGUI::Asset->getDefault($session)->getUrl("op=$method");
|
||||
$session->http->setRedirect(
|
||||
$session->response->setRedirect(
|
||||
$session->url->page(
|
||||
$process->contentPairs(
|
||||
'ProgressBar', {
|
||||
|
|
|
|||
|
|
@ -482,7 +482,7 @@ Checks to ensure the requestor is who we think it is, and then executes a workfl
|
|||
sub www_runWorkflow {
|
||||
my $session = shift;
|
||||
$session->response->content_type("text/plain");
|
||||
$session->http->setCacheControl("none");
|
||||
$session->response->setCacheControl("none");
|
||||
unless (Net::CIDR::Lite->new(@{ $session->config->get('spectreSubnets')} )->find($session->request->address) || canRunWorkflow($session)) {
|
||||
$session->log->security("make a Spectre workflow runner request, but we're only allowed to accept requests from ".join(",",@{$session->config->get("spectreSubnets")}).".");
|
||||
return "error";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue