alchemy-devise 5.0.1 → 5.1.0
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/README.md +2 -2
- data/app/views/alchemy/admin/users/index.html.erb +15 -16
- data/config/initializers/alchemy.rb +14 -12
- data/lib/alchemy/devise/ability.rb +3 -3
- data/lib/alchemy/devise/version.rb +1 -1
- metadata +8 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4566c3a7aadd785a139dc528390802f45533b65636401ca375e6042d91a9a5bb
|
|
4
|
+
data.tar.gz: 44d966cecce3748e86cbf44a610379e969985d809059e31429807f343ffae5f2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bb99df8c86c7dc025f2530a1a2c148a6a31dc24e3b4bf4eee5751ba74d1402da286632af41e1256e8d2c03285aeb85cb7c2fc0396667cb52676f815ac76ad683
|
|
7
|
+
data.tar.gz: dc2b39ae26a2979f2e363fc3cbe569347e138f3e238d4cbe500ac1879e94effb5887b08ab37b3886f01a3b5d88da628256c049ac5e219ce01d01151e1fa806a6
|
data/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
## Devise based authentication for AlchemyCMS
|
|
2
2
|
|
|
3
|
-
[](http://travis-ci.com/AlchemyCMS/alchemy-devise)
|
|
4
4
|
|
|
5
|
-
[](http://badge.fury.io/rb/alchemy-devise) [](https://codeclimate.com/github/AlchemyCMS/alchemy-devise/coverage) [](https://codeclimate.com/github/AlchemyCMS/alchemy-devise) [](http://badge.fury.io/rb/alchemy-devise) [](https://codeclimate.com/github/AlchemyCMS/alchemy-devise/coverage) [](https://codeclimate.com/github/AlchemyCMS/alchemy-devise) [](https://hakiri.io/github/AlchemyCMS/alchemy-devise/main)
|
|
6
6
|
|
|
7
7
|
AlchemyCMS has no authentication in its core. So it is possible to bring your own authentication and use it to authorize users in AlchemyCMS. If you don't have your own authentication, you can use this gem.
|
|
8
8
|
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
<%= toolbar
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
<%= content_for :toolbar do %>
|
|
2
|
+
<%= toolbar_button(
|
|
3
|
+
icon: :plus,
|
|
4
|
+
label: Alchemy.t(:create_user),
|
|
5
|
+
url: alchemy.new_admin_user_path,
|
|
6
|
+
title: Alchemy.t(:create_user),
|
|
7
|
+
hotkey: 'alt+n',
|
|
8
|
+
dialog_options: {
|
|
7
9
|
title: Alchemy.t(:create_user),
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
) %>
|
|
10
|
+
size: "430x560"
|
|
11
|
+
},
|
|
12
|
+
if_permitted_to: [:create, Alchemy::User]
|
|
13
|
+
) %>
|
|
14
|
+
<%= render "alchemy/admin/partials/search_form" %>
|
|
15
|
+
<% end %>
|
|
17
16
|
|
|
18
17
|
<div id="archive_all" class="resources-table-wrapper">
|
|
19
|
-
<%=
|
|
18
|
+
<%= render "alchemy/admin/resources/table_header" %>
|
|
20
19
|
<% if @users.any? %>
|
|
21
20
|
|
|
22
21
|
<table class="list" id="user_list">
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "alchemy/devise/ability"
|
|
2
4
|
|
|
3
5
|
Alchemy.register_ability(Alchemy::Devise::Ability)
|
|
4
6
|
|
|
5
7
|
Alchemy::Modules.register_module({
|
|
6
|
-
name:
|
|
7
|
-
engine_name:
|
|
8
|
+
name: "users",
|
|
9
|
+
engine_name: "alchemy",
|
|
8
10
|
position: 4.1,
|
|
9
11
|
navigation: {
|
|
10
|
-
name:
|
|
11
|
-
controller:
|
|
12
|
-
action:
|
|
13
|
-
icon:
|
|
14
|
-
}
|
|
12
|
+
name: "modules.users",
|
|
13
|
+
controller: "/alchemy/admin/users",
|
|
14
|
+
action: "index",
|
|
15
|
+
icon: "users",
|
|
16
|
+
},
|
|
15
17
|
})
|
|
16
18
|
|
|
17
|
-
Alchemy.user_class_name =
|
|
18
|
-
Alchemy.signup_path
|
|
19
|
-
Alchemy.login_path
|
|
20
|
-
Alchemy.logout_path
|
|
19
|
+
Alchemy.user_class_name = "Alchemy::User"
|
|
20
|
+
Alchemy.signup_path = "/admin/signup"
|
|
21
|
+
Alchemy.login_path = "/admin/login"
|
|
22
|
+
Alchemy.logout_path = "/admin/logout"
|
|
21
23
|
|
|
22
24
|
if Alchemy.respond_to?(:logout_method)
|
|
23
25
|
Rails.application.config.after_initialize do
|
|
@@ -10,16 +10,16 @@ module Alchemy
|
|
|
10
10
|
can :create, Alchemy::User if Alchemy::User.count == 0
|
|
11
11
|
|
|
12
12
|
if member? || author? || editor?
|
|
13
|
-
can [:show, :update], Alchemy
|
|
13
|
+
can [:show, :update], Alchemy::User, id: user.id
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
if editor? || admin?
|
|
17
17
|
can :index, :alchemy_admin_users
|
|
18
|
-
can :read, Alchemy
|
|
18
|
+
can :read, Alchemy::User
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
if admin?
|
|
22
|
-
can :manage, Alchemy
|
|
22
|
+
can :manage, Alchemy::User
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: alchemy-devise
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.0
|
|
4
|
+
version: 5.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thomas von Deyen
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-01-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: alchemy_cms
|
|
@@ -16,20 +16,20 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 5.0.0
|
|
20
20
|
- - "<"
|
|
21
21
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '
|
|
22
|
+
version: '6'
|
|
23
23
|
type: :runtime
|
|
24
24
|
prerelease: false
|
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
26
|
requirements:
|
|
27
27
|
- - ">="
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version:
|
|
29
|
+
version: 5.0.0
|
|
30
30
|
- - "<"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
32
|
+
version: '6'
|
|
33
33
|
- !ruby/object:Gem::Dependency
|
|
34
34
|
name: devise
|
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -211,8 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
211
211
|
version: '0'
|
|
212
212
|
requirements: []
|
|
213
213
|
rubygems_version: 3.1.4
|
|
214
|
-
signing_key:
|
|
214
|
+
signing_key:
|
|
215
215
|
specification_version: 4
|
|
216
216
|
summary: Devise based user authentication for AlchemyCMS.
|
|
217
217
|
test_files: []
|
|
218
|
-
...
|