files.com 1.1.255 → 1.1.257
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/_VERSION +1 -1
- data/docs/user_lifecycle_rule.md +48 -0
- data/lib/files.com/models/user_lifecycle_rule.rb +45 -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: 9b251c6b20a651ff6a6ce991a3b15930b745253388538f2998304befb68eba72
|
4
|
+
data.tar.gz: 944a6c467b74be83801cc2dd0069f090f5cd181d876ee01f8d230af1eadd2f46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96bd1394decb1161c0e452c6e34144e04c7055b3386466ba634f33667834a13f9d6994985779a26c0d1cd99be43398b68783b38cd0a18c2a48a078afa36c794a
|
7
|
+
data.tar.gz: c8e78c1026c224de7ba80b991b2620b8eec85ec808e3d3b4ed396c6ae22bf043bcebc4d1850d80b7c05cecfa6109f8e8d13ff12101ea59500e3e68e30578084b
|
data/README.md
CHANGED
@@ -238,6 +238,13 @@ time.
|
|
238
238
|
The argument value is a Ruby hash that has a key of the resource field name to sort on and a value
|
239
239
|
of either ```"asc"``` or ```"desc"``` to specify the sort order.
|
240
240
|
|
241
|
+
#### Special note about the List Folder Endpoint
|
242
|
+
|
243
|
+
For historical reasons, and to maintain compatibility
|
244
|
+
with a variety of other cloud-based MFT and EFSS services, Folders will always be listed before Files
|
245
|
+
when listing a Folder. This applies regardless of the sorting parameters you provide. These *will* be
|
246
|
+
used, after the initial sort application of Folders before Files.
|
247
|
+
|
241
248
|
```ruby title="Sort Example"
|
242
249
|
begin
|
243
250
|
# users sorted by username
|
data/_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.257
|
data/docs/user_lifecycle_rule.md
CHANGED
@@ -72,6 +72,29 @@ Files::UserLifecycleRule.create(
|
|
72
72
|
* `include_folder_admins` (boolean): Include folder admins in the rule
|
73
73
|
|
74
74
|
|
75
|
+
---
|
76
|
+
|
77
|
+
## Update User Lifecycle Rule
|
78
|
+
|
79
|
+
```
|
80
|
+
Files::UserLifecycleRule.update(id,
|
81
|
+
authentication_method: "password",
|
82
|
+
inactivity_days: 12,
|
83
|
+
include_site_admins: true,
|
84
|
+
include_folder_admins: true
|
85
|
+
)
|
86
|
+
```
|
87
|
+
|
88
|
+
### Parameters
|
89
|
+
|
90
|
+
* `id` (int64): Required - User Lifecycle Rule ID.
|
91
|
+
* `action` (string): Required - Action to take on inactive users (disable or delete)
|
92
|
+
* `authentication_method` (string): Required - User authentication method for the rule
|
93
|
+
* `inactivity_days` (int64): Required - Number of days of inactivity before the rule applies
|
94
|
+
* `include_site_admins` (boolean): Include site admins in the rule
|
95
|
+
* `include_folder_admins` (boolean): Include folder admins in the rule
|
96
|
+
|
97
|
+
|
75
98
|
---
|
76
99
|
|
77
100
|
## Delete User Lifecycle Rule
|
@@ -85,6 +108,31 @@ Files::UserLifecycleRule.delete(id)
|
|
85
108
|
* `id` (int64): Required - User Lifecycle Rule ID.
|
86
109
|
|
87
110
|
|
111
|
+
---
|
112
|
+
|
113
|
+
## Update User Lifecycle Rule
|
114
|
+
|
115
|
+
```
|
116
|
+
user_lifecycle_rule = Files::UserLifecycleRule.find(id)
|
117
|
+
|
118
|
+
user_lifecycle_rule.update(
|
119
|
+
authentication_method: "password",
|
120
|
+
inactivity_days: 12,
|
121
|
+
include_site_admins: true,
|
122
|
+
include_folder_admins: true
|
123
|
+
)
|
124
|
+
```
|
125
|
+
|
126
|
+
### Parameters
|
127
|
+
|
128
|
+
* `id` (int64): Required - User Lifecycle Rule ID.
|
129
|
+
* `action` (string): Required - Action to take on inactive users (disable or delete)
|
130
|
+
* `authentication_method` (string): Required - User authentication method for the rule
|
131
|
+
* `inactivity_days` (int64): Required - Number of days of inactivity before the rule applies
|
132
|
+
* `include_site_admins` (boolean): Include site admins in the rule
|
133
|
+
* `include_folder_admins` (boolean): Include folder admins in the rule
|
134
|
+
|
135
|
+
|
88
136
|
---
|
89
137
|
|
90
138
|
## Delete User Lifecycle Rule
|
@@ -72,6 +72,28 @@ module Files
|
|
72
72
|
@attributes[:site_id] = value
|
73
73
|
end
|
74
74
|
|
75
|
+
# Parameters:
|
76
|
+
# action (required) - string - Action to take on inactive users (disable or delete)
|
77
|
+
# authentication_method (required) - string - User authentication method for the rule
|
78
|
+
# inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
|
79
|
+
# include_site_admins - boolean - Include site admins in the rule
|
80
|
+
# include_folder_admins - boolean - Include folder admins in the rule
|
81
|
+
def update(params = {})
|
82
|
+
params ||= {}
|
83
|
+
params[:id] = @attributes[:id]
|
84
|
+
raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
|
85
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
86
|
+
raise InvalidParameterError.new("Bad parameter: action must be an String") if params[:action] and !params[:action].is_a?(String)
|
87
|
+
raise InvalidParameterError.new("Bad parameter: authentication_method must be an String") if params[:authentication_method] and !params[:authentication_method].is_a?(String)
|
88
|
+
raise InvalidParameterError.new("Bad parameter: inactivity_days must be an Integer") if params[:inactivity_days] and !params[:inactivity_days].is_a?(Integer)
|
89
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
90
|
+
raise MissingParameterError.new("Parameter missing: action") unless params[:action]
|
91
|
+
raise MissingParameterError.new("Parameter missing: authentication_method") unless params[:authentication_method]
|
92
|
+
raise MissingParameterError.new("Parameter missing: inactivity_days") unless params[:inactivity_days]
|
93
|
+
|
94
|
+
Api.send_request("/user_lifecycle_rules/#{@attributes[:id]}", :patch, params, @options)
|
95
|
+
end
|
96
|
+
|
75
97
|
def delete(params = {})
|
76
98
|
params ||= {}
|
77
99
|
params[:id] = @attributes[:id]
|
@@ -89,7 +111,7 @@ module Files
|
|
89
111
|
|
90
112
|
def save
|
91
113
|
if @attributes[:id]
|
92
|
-
|
114
|
+
new_obj = update(@attributes)
|
93
115
|
else
|
94
116
|
new_obj = UserLifecycleRule.create(@attributes, @options)
|
95
117
|
end
|
@@ -148,6 +170,28 @@ module Files
|
|
148
170
|
UserLifecycleRule.new(response.data, options)
|
149
171
|
end
|
150
172
|
|
173
|
+
# Parameters:
|
174
|
+
# action (required) - string - Action to take on inactive users (disable or delete)
|
175
|
+
# authentication_method (required) - string - User authentication method for the rule
|
176
|
+
# inactivity_days (required) - int64 - Number of days of inactivity before the rule applies
|
177
|
+
# include_site_admins - boolean - Include site admins in the rule
|
178
|
+
# include_folder_admins - boolean - Include folder admins in the rule
|
179
|
+
def self.update(id, params = {}, options = {})
|
180
|
+
params ||= {}
|
181
|
+
params[:id] = id
|
182
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
183
|
+
raise InvalidParameterError.new("Bad parameter: action must be an String") if params[:action] and !params[:action].is_a?(String)
|
184
|
+
raise InvalidParameterError.new("Bad parameter: authentication_method must be an String") if params[:authentication_method] and !params[:authentication_method].is_a?(String)
|
185
|
+
raise InvalidParameterError.new("Bad parameter: inactivity_days must be an Integer") if params[:inactivity_days] and !params[:inactivity_days].is_a?(Integer)
|
186
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
187
|
+
raise MissingParameterError.new("Parameter missing: action") unless params[:action]
|
188
|
+
raise MissingParameterError.new("Parameter missing: authentication_method") unless params[:authentication_method]
|
189
|
+
raise MissingParameterError.new("Parameter missing: inactivity_days") unless params[:inactivity_days]
|
190
|
+
|
191
|
+
response, options = Api.send_request("/user_lifecycle_rules/#{params[:id]}", :patch, params, options)
|
192
|
+
UserLifecycleRule.new(response.data, options)
|
193
|
+
end
|
194
|
+
|
151
195
|
def self.delete(id, params = {}, options = {})
|
152
196
|
params ||= {}
|
153
197
|
params[:id] = id
|
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.257
|
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-05-
|
11
|
+
date: 2025-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|