diff --git a/fhem/FHEM/96_allowed.pm b/fhem/FHEM/96_allowed.pm index 89f143271..6a7ef3fd5 100644 --- a/fhem/FHEM/96_allowed.pm +++ b/fhem/FHEM/96_allowed.pm @@ -32,6 +32,7 @@ allowed_Initialize($) basicAuthExpiry basicAuthMsg disable:1,0 + disabledForIntervals globalpassword password reportAuthAttempts @@ -95,7 +96,7 @@ allowed_Authorize($$$$;$) { my ($me, $cl, $type, $arg, $silent) = @_; - return 0 if($me->{disabled}); + return 0 if($me->{disabled} && IsDisabled($me->{NAME})); my $vName = $cl->{SNAME} ? $cl->{SNAME} : $cl->{NAME}; return 0 if(!$me->{".validFor"}{$vName}); my $mName = $me->{NAME}; @@ -150,7 +151,7 @@ allowed_Authenticate($$$$) return $r; }; - return 0 if($me->{disabled}); + return 0 if($me->{disabled} && IsDisabled($aName)); my $vName = $cl->{SNAME} ? $cl->{SNAME} : $cl->{NAME}; return 0 if(!$me->{".validFor"}{$vName}); @@ -306,8 +307,10 @@ allowed_Attr(@) my $set = ($type eq "del" ? 0 : (!defined($param[0]) || $param[0]) ? 1 : 0); - if($attrName eq "disable") { - readingsSingleUpdate($hash, "state", $set ? "disabled" : "active", 1); + if($attrName eq "disable" || + $attrName eq "disabledForIntervals") { + readingsSingleUpdate($hash, "state", $set ? "disabled" : "active", 1) + if($attrName eq "disable"); if($set) { $hash->{disabled} = 1; } else { @@ -454,8 +457,6 @@ EOF Attributes