kaui 0.14.1 → 0.14.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a9ec1ec7ef252ca12a43f8149f34b8d05f9380e
|
4
|
+
data.tar.gz: 74b4b0292efc15111d1c199572a38dc8d47db671
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d1c6e1c3c01e6e17fa8b124a6211edfb95cd3104770b1f2abaa93a661e96334263564ea5b5bdaa9c450912182daba58efe24915b606d42ac090addaa23055cf
|
7
|
+
data.tar.gz: 5bb0eb6ca5e539d3c8debd3fbca23817d028ae14438e3f7ded0f770d2e73709b2ae59c1ace08db7e3fbde6cc15bb24a1086a55de0d8c3ebb4fc0245b14f84d11
|
@@ -71,7 +71,7 @@ class Kaui::AdminTenantsController < Kaui::EngineController
|
|
71
71
|
|
72
72
|
def show
|
73
73
|
@tenant = safely_find_tenant_by_id(params[:id])
|
74
|
-
@allowed_users = retrieve_allowed_users_for_current_user
|
74
|
+
@allowed_users = @tenant.kaui_allowed_users & retrieve_allowed_users_for_current_user
|
75
75
|
end
|
76
76
|
|
77
77
|
def upload_catalog
|
@@ -171,7 +171,13 @@ class Kaui::AdminTenantsController < Kaui::EngineController
|
|
171
171
|
|
172
172
|
def remove_allowed_user
|
173
173
|
current_tenant = safely_find_tenant_by_id(params[:id])
|
174
|
-
au = Kaui::AllowedUser.find(params
|
174
|
+
au = Kaui::AllowedUser.find(params.require(:allowed_user).require(:id))
|
175
|
+
|
176
|
+
if Kaui.root_username != current_user.kb_username
|
177
|
+
render :json => {:alert => 'Only the root user can remove users from tenants'}.to_json, :status => 401
|
178
|
+
return
|
179
|
+
end
|
180
|
+
|
175
181
|
# remove the association
|
176
182
|
au.kaui_tenants.delete current_tenant
|
177
183
|
render :json => '{}', :status => 200
|
@@ -30,9 +30,11 @@
|
|
30
30
|
<td><%= link_to u.kb_username, admin_allowed_user_path(u.id) %></td>
|
31
31
|
<td><%= u.description %></td>
|
32
32
|
<td>
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
<% if Kaui.root_username == current_user.kb_username %>
|
34
|
+
<button type="button" class="btn btn-default btn-sm" id="<%= "allowed-user-remove-#{u.id}" %>">
|
35
|
+
<span class="fa fa-times"></span>
|
36
|
+
</button>
|
37
|
+
<% end %>
|
36
38
|
</td>
|
37
39
|
</tr>
|
38
40
|
<% end %>
|
data/lib/kaui/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Killbill core team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|