Skip to content

Commit

Permalink
Merge d990871 into 5332812
Browse files Browse the repository at this point in the history
  • Loading branch information
brampauwelyn committed Sep 19, 2019
2 parents 5332812 + d990871 commit e0c5f25
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CultureFeed/CultureFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -1908,6 +1908,17 @@ public function getServiceConsumerByApiKey($apiKey, $includePermissions = TRUE)
return $this->parseServiceConsumerFromXmlString($result);
}

/**
* Add group permission to uitpas
*
* @param CultureFeed_Consumer $consumer
* @param int $permissionGroup
*/
public function addUitpasPermission(CultureFeed_Consumer $consumer, int $permissionGroup) {
$params = ['group' => $permissionGroup];
$this->oauth_client->consumerPostAsXML('uitpas/consumerpermission/' . $consumer->consumerKey, $params);
}

/**
* {@inheritdoc}
*/
Expand Down
5 changes: 5 additions & 0 deletions CultureFeed/CultureFeed/ICultureFeedDecoratorBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,11 @@ public function uploadUserDepiction($id, $file_data)
return $this->realCultureFeed->uploadUserDepiction($id, $file_data);
}

public function addUitpasPermission(CultureFeed_Consumer $consumer, int $permissionGroup)
{
return $this->realCultureFeed->addUitpasPermission($consumer, $permissionGroup);
}

/**
* {@inheritdoc}
*/
Expand Down
2 changes: 2 additions & 0 deletions CultureFeed/ICultureFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ public function createServiceConsumer(CultureFeed_Consumer $consumer);

public function updateServiceConsumer(CultureFeed_Consumer $consumer);

public function addUitpasPermission(CultureFeed_Consumer $consumer, int $permissionGroup);

/**
* Add a user as service consumer admin.
* @param $consumerKey
Expand Down

0 comments on commit e0c5f25

Please sign in to comment.