Merge pull request #19764 from FHenry/dev_BDD_19763
NEW: #19763 DB change only - Can invoice task time per different services
This commit is contained in:
commit
4d2832e8a0
@ -11,17 +11,28 @@ use OAuth\Common\Http\Exception\TokenResponseException;
|
||||
use OAuth\OAuth2\Service\Exception\InvalidAccessTypeException;
|
||||
use OAuth\Common\Http\Uri\Uri;
|
||||
|
||||
/**
|
||||
* Class For WordPress OAuth
|
||||
*/
|
||||
class WordPress extends AbstractService
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $accessType = 'online';
|
||||
|
||||
public function __construct(
|
||||
CredentialsInterface $credentials,
|
||||
ClientInterface $httpClient,
|
||||
TokenStorageInterface $storage,
|
||||
$scopes = array(),
|
||||
UriInterface $baseApiUri = null
|
||||
) {
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
* @param CredentialsInterface $credentials credentials
|
||||
* @param ClientInterface $httpClient httpClient
|
||||
* @param TokenStorageInterface $storage storage
|
||||
* @param $scopes scope
|
||||
* @param UriInterface|null $baseApiUri baseApiUri
|
||||
* @throws Exception\InvalidScopeException
|
||||
*/
|
||||
public function __construct(CredentialsInterface $credentials, ClientInterface $httpClient, TokenStorageInterface $storage, $scopes = array(), UriInterface $baseApiUri = null)
|
||||
{
|
||||
parent::__construct($credentials, $httpClient, $storage, $scopes, $baseApiUri, true);
|
||||
|
||||
if (null === $baseApiUri) {
|
||||
@ -41,7 +52,7 @@ class WordPress extends AbstractService
|
||||
}*/
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return Uri
|
||||
*/
|
||||
public function getAuthorizationEndpoint()
|
||||
{
|
||||
@ -49,7 +60,7 @@ class WordPress extends AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return Uri
|
||||
*/
|
||||
public function getAccessTokenEndpoint()
|
||||
{
|
||||
@ -57,7 +68,7 @@ class WordPress extends AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @return int
|
||||
*/
|
||||
protected function getAuthorizationMethod()
|
||||
{
|
||||
@ -66,7 +77,9 @@ class WordPress extends AbstractService
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* @param $responseBody responseBody
|
||||
* @return StdOAuth2Token
|
||||
* @throws TokenResponseException
|
||||
*/
|
||||
protected function parseAccessTokenResponse($responseBody)
|
||||
{
|
||||
|
||||
@ -39,3 +39,5 @@ UPDATE llx_rights_def SET perms = 'writeall' WHERE perms = 'writeall_advance' AN
|
||||
-- v16
|
||||
|
||||
|
||||
-- Missing in v14 or lower
|
||||
ALTER TABLE llx_projet_task_time ADD COLUMN fk_product integer NULL;
|
||||
|
||||
@ -24,6 +24,7 @@ create table llx_projet_task_time
|
||||
task_datehour datetime, -- day + hour
|
||||
task_date_withhour integer DEFAULT 0, -- 0 by default, 1 if date was entered with start hour
|
||||
task_duration double,
|
||||
fk_product integer NULL,
|
||||
fk_user integer,
|
||||
thm double(24,8),
|
||||
invoice_id integer DEFAULT NULL, -- If we need to invoice each line of timespent, we can save invoice id here
|
||||
|
||||
Loading…
Reference in New Issue
Block a user