Skip to content

Commit

Permalink
PubNub SDK v4.1.7 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
client-engineering-bot committed Sep 15, 2020
1 parent cf11d6b commit 18c60ce
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: php
version: 4.1.6
version: 4.1.7
schema: 1
scm: github.com/pubnub/php
changelog:
- version: v4.1.7
date: Sep 14, 20
changes:
-
text: "Add delete permission support to grant call."
type: feature
- version: v4.1.6
date: Aug 20, 20
changes:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [v4.1.7](https://github.com/pubnub/php/releases/tag/v4.1.7)
September-14-2020

- 🌟️ Add delete permission support to grant call.

## [v4.1.6](https://github.com/pubnub/php/releases/tag/v4.1.6)
August-20-2020

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"keywords": ["api", "real-time", "realtime", "real time", "ajax", "push"],
"homepage": "http://www.pubnub.com/",
"license": "MIT",
"version": "4.1.6",
"version": "4.1.7",
"authors": [
{
"name": "PubNub",
Expand Down
18 changes: 18 additions & 0 deletions src/PubNub/Endpoints/Access/Grant.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class Grant extends Endpoint
/** @var bool */
protected $manage;

/** @var bool */
protected $delete;

/** @var int */
protected $ttl;

Expand Down Expand Up @@ -99,6 +102,17 @@ public function manage($flag)
return $this;
}

/**
* @param bool $flag
* @return $this
*/
public function delete($flag)
{
$this->delete = $flag;

return $this;
}

/**
* Set time in minutes for which granted permissions are valid
*
Expand Down Expand Up @@ -150,6 +164,10 @@ public function customParams()
$params["m"] = ($this->manage) ? "1" : "0";
}

if ($this->delete !== null) {
$params["d"] = ($this->delete) ? "1" : "0";
}

if (count($this->authKeys) > 0) {
$params["auth"] = PubNubUtil::joinItems($this->authKeys);
}
Expand Down
2 changes: 1 addition & 1 deletion src/PubNub/PubNub.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

class PubNub
{
const SDK_VERSION = "4.1.6";
const SDK_VERSION = "4.1.7";
const SDK_NAME = "PubNub-PHP";

public static $MAX_SEQUENCE = 65535;
Expand Down

0 comments on commit 18c60ce

Please sign in to comment.