Patch verwendung FHEM::Core::Authentication::Passwords #4

Merged
marko merged 11 commits from patch-newPasswordStore into devel 2021-04-23 06:13:47 +00:00
3 changed files with 5 additions and 9 deletions
Showing only changes of commit 013576915f - Show all commits

View File

@ -199,7 +199,7 @@ sub Initialize {
], ],
"release_status": "stable", "release_status": "stable",
"license": "GPL_2", "license": "GPL_2",
"version": "v1.2.1", "version": "v2.0.0",
"author": [ "author": [
"Marko Oldenburg <leongaultier@gmail.com>" "Marko Oldenburg <leongaultier@gmail.com>"
], ],

View File

@ -1,2 +1 @@
UPD 2021-04-20_21:40:31 6866 FHEM/46_TeslaPowerwall2AC.pm UPD 2021-04-21_10:01:00 6866 FHEM/46_TeslaPowerwall2AC.pm
UPD 2021-04-20_22:39:25 30202 lib/FHEM/Tesla/Powerwall.pm

View File

@ -365,7 +365,8 @@ sub Get {
$list .= $list .=
'statusSOE:noArg aggregates:noArg siteinfo:noArg sitemaster:noArg powerwalls:noArg registration:noArg status:noArg' 'statusSOE:noArg aggregates:noArg siteinfo:noArg sitemaster:noArg powerwalls:noArg registration:noArg status:noArg'
if( ::AttrVal($name,'emailaddr','none') ne 'none' if( ::AttrVal($name,'emailaddr','none') ne 'none'
&& defined(ReadPassword($hash, $name)) && exists($hash->{helper}->{passObj})
&& defined($hash->{helper}->{passObj}->getReadPassword($name))
&& defined($hash->{TOKEN}) ); && defined($hash->{TOKEN}) );
return 'Unknown argument ' . $cmd . ', choose one of ' . $list; return 'Unknown argument ' . $cmd . ', choose one of ' . $list;
@ -406,11 +407,9 @@ sub Set {
if ( !defined($passResp) if ( !defined($passResp)
and defined($passErr) ); and defined($passErr) );
return q{password successfully saved} return Timer_GetData($hash)
if ( defined($passResp) if ( defined($passResp)
and !defined($passErr) ); and !defined($passErr) );
return Timer_GetData($hash);
} }
elsif ( lc $cmd eq 'removepassword' ) { elsif ( lc $cmd eq 'removepassword' ) {
return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 ); return "usage: $cmd" if ( scalar( @{$aArg} ) != 0 );
@ -429,14 +428,12 @@ sub Set {
else { else {
my $list = ( exists($hash->{helper}->{passObj}) my $list = ( exists($hash->{helper}->{passObj})
&& exists($hash->{helper}->{passObj})
&& defined($hash->{helper}->{passObj}->getReadPassword($name)) && defined($hash->{helper}->{passObj}->getReadPassword($name))
? 'removePassword:noArg ' ? 'removePassword:noArg '
: 'setPassword '); : 'setPassword ');
$list .= 'powerwalls:run,stop' $list .= 'powerwalls:run,stop'
if ( ::AttrVal( $name, 'devel', 0 ) == 1 if ( ::AttrVal( $name, 'devel', 0 ) == 1
&& exists($hash->{helper}->{passObj})
&& exists($hash->{helper}->{passObj}) && exists($hash->{helper}->{passObj})
&& defined($hash->{helper}->{passObj}->getReadPassword($name)) && defined($hash->{helper}->{passObj}->getReadPassword($name))
&& defined($hash->{TOKEN}) ); && defined($hash->{TOKEN}) );