winix/functions/run.cpp

55 lines
630 B
C++
Executable File

/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2014, Tomasz Sowa
* All rights reserved.
*
*/
#include "run.h"
namespace Winix
{
namespace Fun
{
Run::Run()
{
fun.url = L"run";
}
void Run::MakePost()
{
MakeGet();
}
void Run::MakeGet()
{
if( !cur->request->is_item )
{
log << log1 << "Content: Run function requires an item" << logend;
cur->request->status = WINIX_ERR_NO_ITEM;
return;
}
if( !system->HasReadExecAccess(cur->request->item) )
{
cur->request->status = WINIX_ERR_PERMISSION_DENIED;
return;
}
}
} // namespace
} // namespace Winix