sfrest 0.0.41 → 0.0.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sfrest/connection.rb +1 -0
- data/lib/sfrest/security_settings.rb +45 -0
- data/lib/sfrest/version.rb +1 -1
- data/lib/sfrest.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1aaa8110a7f4f77dbf3e382c6eab356eaba212ac1e7c781549701e06e1dcfd76
|
4
|
+
data.tar.gz: 4547d55501b96104f8db759ecff0164b8ed7f2fd3aba313fd79c13975c74e7ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fe6355a532f008da04903c25e27e7f6ddf28541bcd29768979178c3a0dce17b776fe17b8ced00e7f23c02e6d247a46fd4099a1ff412bbdfe951fe8ca3e0382d
|
7
|
+
data.tar.gz: 36de7a3762555fa9b6ca39f270f0cee99f95661ccc760738e4fd5ccd4668689890f8507abd85921c66fb27a686ffbebd8532d8bda18b0c96378a4697ff550afc
|
data/lib/sfrest/connection.rb
CHANGED
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SFRest
|
4
|
+
# We need to keep this naming due to the way connection.rb autoloads things.
|
5
|
+
# rubocop: disable Naming/ClassAndModuleCamelCase
|
6
|
+
# Manage the factory security settings.
|
7
|
+
class Security_settings
|
8
|
+
# rubocop: enable Naming/ClassAndModuleCamelCase
|
9
|
+
|
10
|
+
# @param [SFRest::Connection] conn
|
11
|
+
def initialize(conn)
|
12
|
+
@conn = conn
|
13
|
+
end
|
14
|
+
|
15
|
+
# Get current security settings.
|
16
|
+
#
|
17
|
+
# @return [Array] an array containing current security settings.
|
18
|
+
def current_security_settings
|
19
|
+
@conn.get('/api/v1/security')
|
20
|
+
end
|
21
|
+
|
22
|
+
# Change security settings.
|
23
|
+
#
|
24
|
+
# @param [Hash] data Options to the security settings
|
25
|
+
# @option data [Integer] 'minimum_password_length'
|
26
|
+
# @option data [String] 'minimum_required_password_strength'
|
27
|
+
# @option data [Boolean] 'two_step_verification'
|
28
|
+
# @option data [Boolean] 'sign_out_inactive_user_accounts'
|
29
|
+
# @option data [Integer] 'sign_out_inactivity_time'
|
30
|
+
# @option data [Boolean] 'automatically_disable_accounts'
|
31
|
+
# @option data [Integer] 'automatically_disable_accounts_after_days'
|
32
|
+
#
|
33
|
+
# @return [Array] an array containing the message given by the server.
|
34
|
+
def change_security_settings(data)
|
35
|
+
@conn.put('/api/v1/security', data.to_json)
|
36
|
+
end
|
37
|
+
|
38
|
+
# Reset current security settings.
|
39
|
+
#
|
40
|
+
# @return [Array] an array containing the message given by the server.
|
41
|
+
def reset_security_settings
|
42
|
+
@conn.delete('/api/v1/security')
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/sfrest/version.rb
CHANGED
data/lib/sfrest.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sfrest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.42
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ACSF Engineering
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -116,6 +116,7 @@ files:
|
|
116
116
|
- lib/sfrest/pathbuilder.rb
|
117
117
|
- lib/sfrest/profile.rb
|
118
118
|
- lib/sfrest/role.rb
|
119
|
+
- lib/sfrest/security_settings.rb
|
119
120
|
- lib/sfrest/site.rb
|
120
121
|
- lib/sfrest/site_guard.rb
|
121
122
|
- lib/sfrest/site_ownership.rb
|