mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
96_allowed.pm: add disabledForIntervals (Forum #122077)
git-svn-id: https://svn.fhem.de/fhem/trunk@24751 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
fd074d58a5
commit
c44250191e
@ -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
|
||||
<a name="allowedattr"></a>
|
||||
<b>Attributes</b>
|
||||
<ul>
|
||||
<li><a href="#disable">disable</a></li><br>
|
||||
|
||||
<a name="allowedCommands"></a>
|
||||
<li>allowedCommands<br>
|
||||
A comma separated list of commands allowed from the matching frontend
|
||||
@ -511,6 +512,9 @@ EOF
|
||||
Only valid if basicAuth is set.
|
||||
</li><br>
|
||||
|
||||
<li><a href="#disable">disable</a></li></br>
|
||||
<li><a href="#disabledForIntervals">disabledForIntervals</a></li></br>
|
||||
|
||||
<a name="password"></a>
|
||||
<li>password<br>
|
||||
Specify a password for telnet instances, which has to be entered as the
|
||||
@ -605,9 +609,6 @@ EOF
|
||||
<a name="allowedattr"></a>
|
||||
<b>Attribute</b>
|
||||
<ul>
|
||||
<li><a href="#disable">disable</a>
|
||||
</li><br>
|
||||
|
||||
<a name="allowedCommands"></a>
|
||||
<li>allowedCommands<br>
|
||||
Eine Komma getrennte Liste der erlaubten Befehle des passenden
|
||||
@ -656,6 +657,9 @@ EOF
|
||||
</li><br>
|
||||
|
||||
|
||||
<li><a href="#disable">disable</a><br>disable</li></br>
|
||||
<li><a href="#disabledForIntervals">disabledForIntervals</a></li></br>
|
||||
|
||||
<a name="password"></a>
|
||||
<li>password<br>
|
||||
Betrifft nur telnet Instanzen (siehe validFor): Bezeichnet ein
|
||||
|
Loading…
Reference in New Issue
Block a user