fosm-rails 0.2.5 → 0.2.6
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/app/controllers/fosm/admin/roles_controller.rb +8 -0
- data/app/views/fosm/admin/roles/index.html.erb +8 -2
- data/config/routes.rb +2 -1
- data/lib/fosm/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b4b02709e65839493af969739422ac26b0c3ec4d98383902a1702aed4a50eb91
|
|
4
|
+
data.tar.gz: dbbf5f429dc6e1b4a3a44a40b1a8da30243faff49cc67863eea87f6a0b150949
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1e9ef292691a6a6cd6c695d8c24ca7e006e8c105d5f108626605d7ca2920ffdd2058c4ba94dd799ccb16dfd91173618de4acf4e7789b6dc004d99b40f78bdb99
|
|
7
|
+
data.tar.gz: 93bae5d74defbf2402b343d998afbbfff53f5fc42d5e8971e31fa6406a3aa150aca64c6558f6c406a9d655a789bb91183c07b4e771e242f2af8a15c6e737d603
|
|
@@ -43,6 +43,14 @@ module Fosm
|
|
|
43
43
|
end
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
+
def refresh_registry
|
|
47
|
+
Fosm::Registry.clear!
|
|
48
|
+
Fosm::Registry.repopulate!
|
|
49
|
+
count = Fosm::Registry.all.size
|
|
50
|
+
redirect_to fosm.admin_roles_path,
|
|
51
|
+
notice: "Registry refreshed — #{count} model#{count == 1 ? '' : 's'} registered."
|
|
52
|
+
end
|
|
53
|
+
|
|
46
54
|
def users_search
|
|
47
55
|
q = params[:q].to_s.strip
|
|
48
56
|
user_type = params[:user_type].presence || "User"
|
|
@@ -11,8 +11,14 @@
|
|
|
11
11
|
<%= @assignments.count %> active assignment<%= @assignments.count == 1 ? "" : "s" %>.
|
|
12
12
|
</p>
|
|
13
13
|
</div>
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
<div class="flex items-center gap-2 shrink-0">
|
|
15
|
+
<%= button_to "↻ Refresh Registry", fosm.refresh_registry_admin_roles_path,
|
|
16
|
+
method: :post,
|
|
17
|
+
class: "text-sm bg-white border border-gray-300 text-gray-700 px-3 py-1.5 rounded hover:bg-gray-50",
|
|
18
|
+
title: "Re-run Fosm::Registry.repopulate! — useful when the registry is empty after a production deploy" %>
|
|
19
|
+
<%= link_to "+ Grant Role", fosm.new_admin_role_path,
|
|
20
|
+
class: "text-sm bg-gray-900 text-white px-3 py-1.5 rounded hover:bg-gray-700" %>
|
|
21
|
+
</div>
|
|
16
22
|
</div>
|
|
17
23
|
|
|
18
24
|
<% if @apps.any? { |_, klass| klass.fosm_lifecycle&.access_defined? } %>
|
data/config/routes.rb
CHANGED
|
@@ -14,7 +14,8 @@ Fosm::Engine.routes.draw do
|
|
|
14
14
|
resources :webhooks, only: [ :index, :new, :create, :destroy ]
|
|
15
15
|
resources :roles, only: [ :index, :new, :create, :destroy ] do
|
|
16
16
|
collection do
|
|
17
|
-
get
|
|
17
|
+
get :users_search
|
|
18
|
+
post :refresh_registry
|
|
18
19
|
end
|
|
19
20
|
end
|
|
20
21
|
resource :settings, only: [ :show ]
|
data/lib/fosm/version.rb
CHANGED