Version 4.7.0
This commit is contained in:
1 parent
517a5e1f70
commit
8ba7d43898
1933 files changed
+65613
-11332
No files matched your search
@@ -399,26 +399,22 @@ class _oauth extends \IPS\Node\Controller
|
||||
},
|
||||
'issue_user_agent' => function( $val )
|
||||
{
|
||||
$agent = \IPS\Http\UserAgent::parse( $val );
|
||||
if ( $agent->ipsApp )
|
||||
{
|
||||
return \IPS\Theme::i()->getTemplate( 'api', 'core', 'admin' )->clientDetails( $val, $agent );
|
||||
}
|
||||
else
|
||||
{
|
||||
return \IPS\Theme::i()->getTemplate( 'api', 'core', 'admin' )->clientDetails( $val );
|
||||
}
|
||||
return \IPS\Theme::i()->getTemplate( 'api', 'core', 'admin' )->clientDetails( $val );
|
||||
|
||||
}
|
||||
);
|
||||
$table->rowButtons = function( $row ) use ( $client ) {
|
||||
return array(
|
||||
'revoke' => array(
|
||||
'icon' => 'times-circle',
|
||||
'title' => 'oauth_app_revoke',
|
||||
'link' => \IPS\Http\Url::internal( "app=core&module=applications&controller=oauth&do=revokeToken&client_id={$row['client_id']}&member_id={$row['member_id']}&token={$row['access_token']}" )->setQueryString( 'r', $client ? 'c' : 'm' )->csrf(),
|
||||
'data' => array( 'delete' => '' )
|
||||
)
|
||||
);
|
||||
$return = [];
|
||||
if( $row['status'] == 'active')
|
||||
{
|
||||
$return['revoke'] = array(
|
||||
'icon' => 'times-circle',
|
||||
'title' => 'oauth_app_revoke',
|
||||
'link' => \IPS\Http\Url::internal( "app=core&module=applications&controller=oauth&do=revokeToken&client_id={$row['client_id']}&member_id={$row['member_id']}&token={$row['access_token']}" )->setQueryString( 'r', $client ? 'c' : 'm' )->csrf(),
|
||||
'data' => array( 'confirm' => '', 'confirmMessage' => \IPS\Member::loggedIn()->language()->addToStack( 'oauth_app_revoke_title' ) )
|
||||
);
|
||||
}
|
||||
return $return;
|
||||
};
|
||||
$revokeAllLink = $client ? \IPS\Http\Url::internal( "app=core&module=applications&controller=oauth&do=revokeAllTokens&client_id={$client->client_id}" )->csrf() : \IPS\Http\Url::internal( "app=core&module=applications&controller=oauth&do=revokeAllTokens&member_id={$member->member_id}" )->csrf();
|
||||
$table->rootButtons = array(
|
||||
|
||||
Reference in new issue
Block a user