pusher-chatkit-server 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chatkit/client.rb +0 -26
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0367989e649fbbb7edfe939ded5742dc65d3313f'
|
4
|
+
data.tar.gz: 43839cc4282d3bac96bd074e7715c11be82d9f34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e16ac49f2c11cea995380f895efd0b7f1866c8ed8d42a64e031c561529cff71f8e69a4d5626a5c896f19777c79d916c3287bf0251f047b2ff956b2419db22eb4
|
7
|
+
data.tar.gz: 35d06482ce5ef1703a6c21c48175033c7b18771c84b7c4eecdafabfa5f1d4fdbc3a7d84c75a1fb26f552f9d04bd3310762069920038401d99cd02e65105c6c06
|
data/lib/chatkit/client.rb
CHANGED
@@ -167,14 +167,6 @@ module Chatkit
|
|
167
167
|
assign_role_to_user(user_id, role_name, room_id)
|
168
168
|
end
|
169
169
|
|
170
|
-
def reassign_global_role_to_user(user_id, role_name)
|
171
|
-
reassign_role_for_user(user_id, role_name, nil)
|
172
|
-
end
|
173
|
-
|
174
|
-
def reassign_room_role_to_user(user_id, role_name, room_id)
|
175
|
-
reassign_role_for_user(user_id, role_name, room_id)
|
176
|
-
end
|
177
|
-
|
178
170
|
def get_roles
|
179
171
|
resp = @authorizer_instance.request(
|
180
172
|
method: "GET",
|
@@ -268,24 +260,6 @@ module Chatkit
|
|
268
260
|
body.merge!(room_id: room_id)
|
269
261
|
end
|
270
262
|
|
271
|
-
@authorizer_instance.request(
|
272
|
-
method: "POST",
|
273
|
-
path: "/users/#{user_id}/roles",
|
274
|
-
headers: {
|
275
|
-
"Content-Type": "application/json",
|
276
|
-
},
|
277
|
-
body: body,
|
278
|
-
jwt: generate_access_token(su: true)
|
279
|
-
)
|
280
|
-
end
|
281
|
-
|
282
|
-
def reassign_role_for_user(user_id, role_name, room_id)
|
283
|
-
body = { name: role_name }
|
284
|
-
|
285
|
-
unless room_id.nil?
|
286
|
-
body[:room_id] = room_id
|
287
|
-
end
|
288
|
-
|
289
263
|
@authorizer_instance.request(
|
290
264
|
method: "PUT",
|
291
265
|
path: "/users/#{user_id}/roles",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pusher-chatkit-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pusher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pusher-platform
|