2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

96_allowed.pm: allow NAME for identification (Forum #53045)

git-svn-id: https://svn.fhem.de/fhem/trunk@11391 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-05-05 11:16:05 +00:00
parent df1aada4fa
commit 08be3c2501

View File

@ -57,7 +57,11 @@ allowed_Authorize($$$$)
my ($me, $cl, $type, $arg) = @_;
return 0 if($me->{disabled});
return 0 if(!$me->{validFor} || $me->{validFor} !~ m/\b$cl->{SNAME}\b/);
if( $cl->{SNAME} ) {
return 0 if(!$me->{validFor} || $me->{validFor} !~ m/\b$cl->{SNAME}\b/);
} else {
return 0 if(!$me->{validFor} || $me->{validFor} !~ m/\b$cl->{NAME}\b/);
}
if($type eq "cmd") {
return 0 if(!$me->{allowedCommands});