ucb_confluence 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,4 +2,4 @@ source :rubygems
2
2
 
3
3
  gemspec
4
4
 
5
- gem "bundler", "1.0.18"
5
+ gem "bundler"
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ucb_confluence (0.0.1)
5
- rake (>= 0.8.7)
4
+ ucb_confluence (0.0.8)
5
+ rake (= 0.8.7)
6
6
  ucb_ldap (>= 1.4.2)
7
7
 
8
8
  GEM
@@ -29,7 +29,7 @@ PLATFORMS
29
29
  ruby
30
30
 
31
31
  DEPENDENCIES
32
- bundler (= 1.0.18)
32
+ bundler
33
33
  diff-lcs (>= 1.1.2)
34
34
  rcov (>= 0.9.9)
35
35
  rspec (>= 1.3.0)
@@ -8,6 +8,8 @@ module Confluence
8
8
  class IstLdapSync
9
9
 
10
10
  IST_GROUP = 'ucb-ist'
11
+ USER_GROUP = 'confluence-users'
12
+ DISABLED_SUFFIX = '(ACCOUNT DISABLED)'
11
13
 
12
14
  def initialize()
13
15
  @new_users = []
@@ -45,7 +47,15 @@ module Confluence
45
47
  user.join_group(IST_GROUP)
46
48
  @modified_users << user
47
49
  end
48
- end
50
+
51
+ # Check if user belongs to users_confluence, if not add them
52
+ # Remove the (ACCOUNT DISABLED) from their fullname
53
+ unless user.groups.include?(USER_GROUP)
54
+ user.fullname=user.fullname.gsub(DISABLED_SUFFIX,"")
55
+ user.save()
56
+ user.join_group(USER_GROUP)
57
+ end
58
+ end
49
59
  end
50
60
 
51
61
  ##
@@ -1,3 +1,3 @@
1
1
  module Confluence
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ucb_confluence
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Steven Hansen
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-03 00:00:00 Z
18
+ date: 2012-04-25 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rake
@@ -181,17 +181,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
181
  requirements: []
182
182
 
183
183
  rubyforge_project: ucb_confluence
184
- rubygems_version: 1.8.10
184
+ rubygems_version: 1.8.22
185
185
  signing_key:
186
186
  specification_version: 3
187
187
  summary: Convenience methods for interacing with Confluence xml-rpc API
188
188
  test_files:
189
- - spec/confluence/config_spec.rb
190
- - spec/confluence/confluence_spec.rb
191
- - spec/confluence/conn_spec.rb
189
+ - spec/spec.opts
192
190
  - spec/confluence/group_spec.rb
193
191
  - spec/confluence/jobs/disable_expired_users_spec.rb
194
192
  - spec/confluence/jobs/ist_ldap_sync_spec.rb
193
+ - spec/confluence/config_spec.rb
194
+ - spec/confluence/confluence_spec.rb
195
195
  - spec/confluence/user_spec.rb
196
- - spec/spec.opts
196
+ - spec/confluence/conn_spec.rb
197
197
  - spec/spec_helper.rb