mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 20:24:36 +00:00
96_allowed: add logging for forbidden commands/devices (Forum #83203)
git-svn-id: https://svn.fhem.de/fhem/trunk@15994 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
90b9eb5f7b
commit
d355dc7f1b
@ -78,12 +78,16 @@ allowed_Authorize($$$$)
|
|||||||
if($type eq "cmd") {
|
if($type eq "cmd") {
|
||||||
return 0 if(!$me->{allowedCommands});
|
return 0 if(!$me->{allowedCommands});
|
||||||
# Return 0: allow stacking with other instances, see Forum#46380
|
# Return 0: allow stacking with other instances, see Forum#46380
|
||||||
return ($me->{allowedCommands} =~ m/\b\Q$arg\E\b/) ? 0 : 2;
|
return 0 if($me->{allowedCommands} =~ m/\b\Q$arg\E\b/);
|
||||||
|
Log3 $me, 4, "Forbidden command $arg for $cl->{NAME}";
|
||||||
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($type eq "devicename") {
|
if($type eq "devicename") {
|
||||||
return 0 if(!$me->{allowedDevices});
|
return 0 if(!$me->{allowedDevices});
|
||||||
return ($me->{allowedDevices} =~ m/\b\Q$arg\E\b/) ? 0 : 2;
|
return if($me->{allowedDevices} =~ m/\b\Q$arg\E\b/);
|
||||||
|
Log3 $me, 4, "Forbidden device $arg for $cl->{NAME}";
|
||||||
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user