effects/screenshot: offer an opt out of permission checking
in a CI context the paths are mutable between installation and use and as such the permission checks can just not ever work. for use in such scenarios allow completely disabling the permission checks
This commit is contained in:
parent
0047dfc596
commit
bcfd735808
2 changed files with 10 additions and 0 deletions
|
@ -507,6 +507,11 @@ bool ScreenShotDBusInterface1::checkCall() const
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool permissionCheckDisabled = qEnvironmentVariableIntValue("KWIN_SCREENSHOT_NO_PERMISSION_CHECKS") == 1;
|
||||
if (permissionCheckDisabled) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const QDBusReply<uint> reply = connection().interface()->servicePid(message().service());
|
||||
if (reply.isValid()) {
|
||||
const uint pid = reply.value();
|
||||
|
|
|
@ -286,6 +286,11 @@ bool ScreenShotDBusInterface2::checkPermissions() const
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool permissionCheckDisabled = qEnvironmentVariableIntValue("KWIN_SCREENSHOT_NO_PERMISSION_CHECKS") == 1;
|
||||
if (permissionCheckDisabled) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const QDBusReply<uint> reply = connection().interface()->servicePid(message().service());
|
||||
if (reply.isValid()) {
|
||||
const uint pid = reply.value();
|
||||
|
|
Loading…
Reference in a new issue