sharepoint_api 2.2.1 → 2.3.1
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/CHANGELOG.md +3 -0
- data/Gemfile.lock +2 -2
- data/lib/sharepoint_api/permissions.rb +16 -0
- data/lib/sharepoint_api/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: 7a9fa238166ddb188042912a71988869b1b443fa55ebd214be69bc6a139f52b4
|
4
|
+
data.tar.gz: db2dd49b85094a1235363c6d0cc6960722d7c4b7400b82d02ce2e1a2f4b44b8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 697f6dd8982e69879bf30fc086596803ee8198ae52f129286949cbcb728ca2d14491e9ec2416c77a44e380adf86dfbe9175d4c21973be4c1d5790d2324bd5b1c
|
7
|
+
data.tar.gz: e904aae5d3086713aec14cd31a486a1195822fa12d4e76a40e8a598dbf5468aa8d0a904d9469602354e62d2e345366998396fca3157a26cf17fe71d18bf19f92
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -45,6 +45,22 @@ class SharepointApi
|
|
45
45
|
false
|
46
46
|
end
|
47
47
|
|
48
|
+
# to rename a sp group when the acronym changes
|
49
|
+
def rename_group(old_group_name, new_group_name)
|
50
|
+
escaped_group_name = encode_path(old_group_name)
|
51
|
+
site.query(:post, "SiteGroups/GetByName('#{escaped_group_name}')", {
|
52
|
+
'__metadata' => { 'type': 'SP.Group' },
|
53
|
+
'Title' => new_group_name,
|
54
|
+
'Description' => "Access Group for #{new_group_name}"
|
55
|
+
}.to_json) do |curl|
|
56
|
+
curl.headers['X-HTTP-Method'] = 'MERGE'
|
57
|
+
end
|
58
|
+
true
|
59
|
+
rescue Sharepoint::SPException => e
|
60
|
+
log_as(__method__, e)
|
61
|
+
false
|
62
|
+
end
|
63
|
+
|
48
64
|
##
|
49
65
|
# This also removes any role definitions the groups is using.
|
50
66
|
def remove_group(group_name)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sharepoint_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kalek
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-11-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|