mobilize-base 1.34 → 1.35
Sign up to get free protection for your applications and to get access to all the features.
@@ -58,7 +58,7 @@ module Mobilize
|
|
58
58
|
def Gfile.update_acl_by_path(path,gdrive_slot,role="writer",target_email=nil)
|
59
59
|
file = Gfile.find_by_path(path,target_email)
|
60
60
|
raise "File #{path} not found" unless file
|
61
|
-
file.update_acl(gdrive_slot,role)
|
61
|
+
file.update_acl(gdrive_slot,"user",role)
|
62
62
|
end
|
63
63
|
|
64
64
|
def Gfile.find_by_path(path)
|
@@ -109,7 +109,7 @@ module Mobilize
|
|
109
109
|
#only give the user edit permissions if they're the ones
|
110
110
|
#creating it
|
111
111
|
target_sheet = Gsheet.find_or_create_by_path(target_path,gdrive_slot)
|
112
|
-
target_sheet.spreadsheet.update_acl(u.email
|
112
|
+
target_sheet.spreadsheet.update_acl(u.email) unless target_sheet.spreadsheet.acl_entry(u.email).ie{|e| e and e.role=="owner"}
|
113
113
|
target_sheet.delete_sheet1
|
114
114
|
end
|
115
115
|
#pass it crop param to determine whether to shrink target sheet to fit data
|
@@ -36,7 +36,7 @@ module Mobilize
|
|
36
36
|
#creating it
|
37
37
|
jobs_sheet = Gsheet.find_or_create_by_path(r.path,gdrive_slot)
|
38
38
|
unless jobs_sheet.spreadsheet.acl_entry(u.email).ie{|e| e and e.role=="owner"}
|
39
|
-
jobs_sheet.spreadsheet.update_acl(u.email
|
39
|
+
jobs_sheet.spreadsheet.update_acl(u.email)
|
40
40
|
end
|
41
41
|
jobs_sheet.add_headers(r.headers)
|
42
42
|
begin;jobs_sheet.delete_sheet1;rescue;end #don't care if sheet1 deletion fails
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mobilize-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.35'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -229,7 +229,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
229
229
|
version: '0'
|
230
230
|
segments:
|
231
231
|
- 0
|
232
|
-
hash:
|
232
|
+
hash: 2066292428042715491
|
233
233
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
234
234
|
none: false
|
235
235
|
requirements:
|
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
238
|
version: '0'
|
239
239
|
segments:
|
240
240
|
- 0
|
241
|
-
hash:
|
241
|
+
hash: 2066292428042715491
|
242
242
|
requirements: []
|
243
243
|
rubyforge_project: mobilize-base
|
244
244
|
rubygems_version: 1.8.25
|