files.com 1.1.214 → 1.1.215
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/permission.md +7 -3
- data/lib/files.com/models/permission.rb +12 -1
- data/lib/files.com/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbd484d37bc76b30ccf6b83aecbd6dc3ea290bc48e7ffc800c88eaf01789dfad
|
4
|
+
data.tar.gz: 55474dd7880a576b0841db13709743c563811943b41c3c0adbe1f81517e5abf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 216284c45420dab170114d42625eb036252146d1377130405c8d64f3f818ec0150becb73c61b51d6fba20a79ad0575207451f435b13be81d4eeb179038a8d524
|
7
|
+
data.tar.gz: bef4589ef41d24231b12d7c5e320aea30e9cb1ace59120226ed51ed3f2f57fca80856023150ff656a6615f58a6f17d472920286b8e070fb273f414cf71d47214
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.215
|
data/docs/permission.md
CHANGED
@@ -11,7 +11,8 @@
|
|
11
11
|
"group_id": 1,
|
12
12
|
"group_name": "example",
|
13
13
|
"permission": "full",
|
14
|
-
"recursive": true
|
14
|
+
"recursive": true,
|
15
|
+
"site_id": 1
|
15
16
|
}
|
16
17
|
```
|
17
18
|
|
@@ -23,6 +24,7 @@
|
|
23
24
|
* `group_name` (string): Group name (if applicable)
|
24
25
|
* `permission` (string): Permission type. See the table referenced in the documentation for an explanation of each permission.
|
25
26
|
* `recursive` (boolean): Recursive: does this permission apply to subfolders?
|
27
|
+
* `site_id` (int64): Site ID
|
26
28
|
|
27
29
|
|
28
30
|
---
|
@@ -42,7 +44,7 @@ Files::Permission.list(
|
|
42
44
|
|
43
45
|
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
44
46
|
* `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
45
|
-
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `group_id`, `path` or `user_id`.
|
47
|
+
* `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `group_id`, `path` or `user_id`.
|
46
48
|
* `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ user_id, path ]` or `[ user_id, group_id ]`.
|
47
49
|
* `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
|
48
50
|
* `path` (string): Permission path. If provided, will scope all permissions(including upward) to this path.
|
@@ -63,7 +65,8 @@ Files::Permission.create(
|
|
63
65
|
recursive: false,
|
64
66
|
user_id: 1,
|
65
67
|
username: "user",
|
66
|
-
group_name: "example"
|
68
|
+
group_name: "example",
|
69
|
+
site_id: 1
|
67
70
|
)
|
68
71
|
```
|
69
72
|
|
@@ -76,6 +79,7 @@ Files::Permission.create(
|
|
76
79
|
* `user_id` (int64): User ID. Provide `username` or `user_id`
|
77
80
|
* `username` (string): User username. Provide `username` or `user_id`
|
78
81
|
* `group_name` (string): Group name. Provide `group_name` or `group_id`
|
82
|
+
* `site_id` (int64): Site ID. If not provided, will default to current site. Used when creating a permission for a child site.
|
79
83
|
|
80
84
|
|
81
85
|
---
|
@@ -81,6 +81,15 @@ module Files
|
|
81
81
|
@attributes[:recursive] = value
|
82
82
|
end
|
83
83
|
|
84
|
+
# int64 - Site ID
|
85
|
+
def site_id
|
86
|
+
@attributes[:site_id]
|
87
|
+
end
|
88
|
+
|
89
|
+
def site_id=(value)
|
90
|
+
@attributes[:site_id] = value
|
91
|
+
end
|
92
|
+
|
84
93
|
def delete(params = {})
|
85
94
|
params ||= {}
|
86
95
|
params[:id] = @attributes[:id]
|
@@ -110,7 +119,7 @@ module Files
|
|
110
119
|
# Parameters:
|
111
120
|
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
112
121
|
# per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
|
113
|
-
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `group_id`, `path` or `user_id`.
|
122
|
+
# sort_by - object - If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `site_id`, `group_id`, `path` or `user_id`.
|
114
123
|
# filter - object - If set, return records where the specified field is equal to the supplied value. Valid fields are `path`, `group_id` or `user_id`. Valid field combinations are `[ group_id, path ]`, `[ user_id, path ]` or `[ user_id, group_id ]`.
|
115
124
|
# filter_prefix - object - If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.
|
116
125
|
# path - string - Permission path. If provided, will scope all permissions(including upward) to this path.
|
@@ -144,6 +153,7 @@ module Files
|
|
144
153
|
# user_id - int64 - User ID. Provide `username` or `user_id`
|
145
154
|
# username - string - User username. Provide `username` or `user_id`
|
146
155
|
# group_name - string - Group name. Provide `group_name` or `group_id`
|
156
|
+
# site_id - int64 - Site ID. If not provided, will default to current site. Used when creating a permission for a child site.
|
147
157
|
def self.create(params = {}, options = {})
|
148
158
|
raise InvalidParameterError.new("Bad parameter: path must be an String") if params[:path] and !params[:path].is_a?(String)
|
149
159
|
raise InvalidParameterError.new("Bad parameter: group_id must be an Integer") if params[:group_id] and !params[:group_id].is_a?(Integer)
|
@@ -151,6 +161,7 @@ module Files
|
|
151
161
|
raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params[:user_id] and !params[:user_id].is_a?(Integer)
|
152
162
|
raise InvalidParameterError.new("Bad parameter: username must be an String") if params[:username] and !params[:username].is_a?(String)
|
153
163
|
raise InvalidParameterError.new("Bad parameter: group_name must be an String") if params[:group_name] and !params[:group_name].is_a?(String)
|
164
|
+
raise InvalidParameterError.new("Bad parameter: site_id must be an Integer") if params[:site_id] and !params[:site_id].is_a?(Integer)
|
154
165
|
raise MissingParameterError.new("Parameter missing: path") unless params[:path]
|
155
166
|
|
156
167
|
response, options = Api.send_request("/permissions", :post, params, options)
|
data/lib/files.com/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: files.com
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.215
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- files.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|