cf-uaac 3.11.0 → 3.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/uaa/cli/common.rb +0 -1
- data/lib/uaa/cli/user.rb +1 -1
- data/lib/uaa/cli/version.rb +1 -1
- data/spec/user_spec.rb +34 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abfe6eadf0fa01ba99d89a0eea473cbd0104338f
|
4
|
+
data.tar.gz: f2b20a9a55eff6d475e47521bfba5a0fa95ce85e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd5e414a3b9d0339b945ee71133146329d398c3b3a66b0793bd32a47df4b02a51d44544705dd1109b20d0c622d8bd52068266a7c865614367aee84bb9c8eb783
|
7
|
+
data.tar.gz: 52d00507c138a3e95de5b1234d12d9e2ab1968a8a4d67c49d3e9d03a088725cd896ceda7c8faecba9957a1296fa99c5ad3fa5a2499f1f245a5ee691ea8041214
|
data/lib/uaa/cli/common.rb
CHANGED
data/lib/uaa/cli/user.rb
CHANGED
@@ -49,7 +49,7 @@ class UserCli < CommonCli
|
|
49
49
|
end
|
50
50
|
|
51
51
|
desc 'user add [name]', 'Add a user account', *USER_INFO_OPTS, :password do |name|
|
52
|
-
info = {userName: username(name), password: verified_pwd('Password', opts[:password])}
|
52
|
+
info = {userName: username(name), password: ((opts[:origin] == nil || opts[:origin] =='uaa') ? verified_pwd('Password', opts[:password]): nil)}
|
53
53
|
pp scim_request { |ua|
|
54
54
|
ua.add(:user, user_opts(info))
|
55
55
|
'user account successfully added'
|
data/lib/uaa/cli/version.rb
CHANGED
data/spec/user_spec.rb
CHANGED
@@ -52,6 +52,40 @@ describe UserCli do
|
|
52
52
|
Cli.run("user delete #{user_with_origin}")
|
53
53
|
end
|
54
54
|
|
55
|
+
it 'creates user without asking for password when origin is not uaa' do
|
56
|
+
user_with_origin = "#{@test_user}_with_origin_ldap"
|
57
|
+
Cli.run("user add #{user_with_origin} " +
|
58
|
+
'--emails sam@example.com --given_name SamueL ' +
|
59
|
+
"--phones 801-555-1212 --family_name jonES --origin ldap").should be
|
60
|
+
|
61
|
+
expect(Cli.output.string).to match 'user account successfully added'
|
62
|
+
|
63
|
+
Cli.run("user delete #{user_with_origin} --origin ldap")
|
64
|
+
expect(Cli.output.string).to match 'user account successfully deleted'
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'create user prompts for password when origin is set to uaa explicitly' do
|
68
|
+
user_with_origin = "#{@test_user}_with_origin_ldap"
|
69
|
+
Cli.input = StringIO.new("password") # selecting first origin through stdin
|
70
|
+
Cli.run("user add #{user_with_origin} " +
|
71
|
+
'--emails sam@example.com --given_name SamueL ' +
|
72
|
+
"--phones 801-555-1212 --family_name jonES --origin uaa").should be
|
73
|
+
|
74
|
+
expect(Cli.output.string).to match 'Password:'
|
75
|
+
Cli.run("user delete #{user_with_origin}")
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'create user prompts for password when origin is uaa implicitly' do
|
79
|
+
user_with_origin = "#{@test_user}_with_origin_ldap"
|
80
|
+
Cli.input = StringIO.new("password") # selecting first origin through stdin
|
81
|
+
Cli.run("user add #{user_with_origin} " +
|
82
|
+
'--emails sam@example.com --given_name SamueL ' +
|
83
|
+
"--phones 801-555-1212 --family_name jonES").should be
|
84
|
+
|
85
|
+
expect(Cli.output.string).to match 'Password:'
|
86
|
+
Cli.run("user delete #{user_with_origin}")
|
87
|
+
end
|
88
|
+
|
55
89
|
it 'updates origin when specified' do
|
56
90
|
user_with_origin = "#{@test_user}_with_origin"
|
57
91
|
create_user_by_origin( user_with_origin, 'ldap')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cf-uaac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Syer
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2017-05-
|
15
|
+
date: 2017-05-22 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: cf-uaa-lib
|