diff options
| author | Sebastien Braun | 2010-11-04 00:38:24 +0100 |
|---|---|---|
| committer | Sebastien Braun | 2010-11-04 00:38:24 +0100 |
| commit | 4fcc0efae9738bb28922da592fff78cfef50277b (patch) | |
| tree | b3855b36abe874606a802ec75fc573543d2d7b35 /src/input/allowLocalOrPrivileged.cpp | |
| parent | [PVSMGRTOUCH] resetall bug fixed (diff) | |
| parent | Documentation fixes and code cleanup (diff) | |
| download | pvs-4fcc0efae9738bb28922da592fff78cfef50277b.tar.gz pvs-4fcc0efae9738bb28922da592fff78cfef50277b.tar.xz pvs-4fcc0efae9738bb28922da592fff78cfef50277b.zip | |
Merge input handling work to master
Diffstat (limited to 'src/input/allowLocalOrPrivileged.cpp')
| -rw-r--r-- | src/input/allowLocalOrPrivileged.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/input/allowLocalOrPrivileged.cpp b/src/input/allowLocalOrPrivileged.cpp new file mode 100644 index 0000000..ba456dc --- /dev/null +++ b/src/input/allowLocalOrPrivileged.cpp @@ -0,0 +1,21 @@ +/* + * inputHandlerSecurityPolicies.cpp + * + * Created on: Oct 7, 2010 + * Author: brs + */ + +#include "inputEventHandler.h" +#include "pvsCheckPrivileges.h" + +bool input_policy::AllowLocalOrPrivileged::allow(InputEventContext const* ctx) +{ + if(ctx) + { + if(PVSCheckPrivileges::instance()->require(PVSCheckPrivileges::SESSION_LOCAL, ctx)) + return true; + if(PVSCheckPrivileges::instance()->require(PVSCheckPrivileges::USER_PRIVILEGED, ctx)) + return true; + } + return false; +} |
