alchemy-devise 5.0.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bceaf41fec555e993944005a9fd8b3999c8d6cfe02c9d95d194907ed1315327f
4
- data.tar.gz: be271d71719f1b1f3e54e91d20e8b4750f269eeaa984da3ea96e4e49242a9814
3
+ metadata.gz: ac9f1d9cb0e0ae6c8785fae335c084f35bc99fd57f0f0ecb8fbb69af31a0acf8
4
+ data.tar.gz: 7a25e4e8233588c7daaeded0550cfe16c01d529f32e8f20c5319afd62a8d2f3a
5
5
  SHA512:
6
- metadata.gz: 611103643240ab89a34a77e0b280180f6dd10cedf5fa59f1cae96c384cd4f8141d331841d71e2b52b7990dc17b41b797bea868e0e3d91ba1ab2d7c6294170d99
7
- data.tar.gz: 8567891ceb7104874d92f681bd2cc2e24946d3d4adf80063d02b4b1289cccf70498a74975c8526dad727fd5d54c64bba0af4a19d0df90d747360502efd16bbb0
6
+ metadata.gz: aef2756070f8c8316ee71ff1d14c3c01f9d00864f4f57178bbf4261552cf69e95c9e3e453a4ae2841557a2c8633bdaf2979d9eaf9149bbaac341098be3e07a92
7
+ data.tar.gz: 2dc752cea79c75090d0bea21c409eba342e135a08a9f0d17bd547e12fdbc557b1e68b27379fd41130294f1bc83df738da13a9a02390a4b6d8d51eaf77ee87380
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  ## Devise based authentication for AlchemyCMS
2
2
 
3
- [![Build Status](https://secure.travis-ci.org/AlchemyCMS/alchemy-devise.svg?branch=master)](http://travis-ci.org/AlchemyCMS/alchemy-devise)
3
+ [![Build Status](https://github.com/AlchemyCMS/alchemy-devise/workflows/CI/badge.svg?branch=main)](https://github.com/AlchemyCMS/alchemy-devise/actions)
4
4
 
5
- [![Gem Version](https://badge.fury.io/rb/alchemy-devise.svg)](http://badge.fury.io/rb/alchemy-devise) [![Test Coverage](https://codeclimate.com/github/AlchemyCMS/alchemy-devise/badges/coverage.svg)](https://codeclimate.com/github/AlchemyCMS/alchemy-devise/coverage) [![Code Climate](https://codeclimate.com/github/AlchemyCMS/alchemy-devise/badges/gpa.svg)](https://codeclimate.com/github/AlchemyCMS/alchemy-devise) [![security](https://hakiri.io/github/AlchemyCMS/alchemy-devise/master.svg)](https://hakiri.io/github/AlchemyCMS/alchemy-devise/master)
5
+ [![Gem Version](https://badge.fury.io/rb/alchemy-devise.svg)](http://badge.fury.io/rb/alchemy-devise) [![Test Coverage](https://codeclimate.com/github/AlchemyCMS/alchemy-devise/badges/coverage.svg)](https://codeclimate.com/github/AlchemyCMS/alchemy-devise/coverage) [![Code Climate](https://codeclimate.com/github/AlchemyCMS/alchemy-devise/badges/gpa.svg)](https://codeclimate.com/github/AlchemyCMS/alchemy-devise) [![security](https://hakiri.io/github/AlchemyCMS/alchemy-devise/main.svg)](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,3 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "alchemy/version"
4
+
1
5
  module Alchemy
2
6
  module Admin
3
7
  class PasswordsController < ::Devise::PasswordsController
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_dependency "alchemy/version"
3
+ require "alchemy/version"
4
4
 
5
5
  module Alchemy
6
6
  module Admin
@@ -1,22 +1,21 @@
1
- <%= toolbar(
2
- buttons: [
3
- {
4
- icon: :plus,
5
- label: Alchemy.t(:create_user),
6
- url: alchemy.new_admin_user_path,
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
- hotkey: 'alt+n',
9
- dialog_options: {
10
- title: Alchemy.t(:create_user),
11
- size: "430x560"
12
- },
13
- if_permitted_to: [:create, Alchemy::User]
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
- <%= resources_header %>
18
+ <%= render "alchemy/admin/resources/table_header" %>
20
19
  <% if @users.any? %>
21
20
 
22
21
  <table class="list" id="user_list">
@@ -1,26 +1,24 @@
1
- require 'alchemy/devise/ability'
1
+ # frozen_string_literal: true
2
2
 
3
- Alchemy.register_ability(Alchemy::Devise::Ability)
3
+ Rails.application.config.to_prepare do
4
+ require "alchemy/devise/ability"
4
5
 
5
- Alchemy::Modules.register_module({
6
- name: 'users',
7
- engine_name: 'alchemy',
8
- position: 4.1,
9
- navigation: {
10
- name: 'modules.users',
11
- controller: 'alchemy/admin/users',
12
- action: 'index',
13
- icon: 'users'
14
- }
15
- })
6
+ Alchemy.register_ability(Alchemy::Devise::Ability)
16
7
 
17
- Alchemy.user_class_name = 'Alchemy::User'
18
- Alchemy.signup_path = '/admin/signup'
19
- Alchemy.login_path = '/admin/login'
20
- Alchemy.logout_path = '/admin/logout'
8
+ Alchemy::Modules.register_module({
9
+ name: "users",
10
+ engine_name: "alchemy",
11
+ position: 4.1,
12
+ navigation: {
13
+ name: "modules.users",
14
+ controller: "/alchemy/admin/users",
15
+ action: "index",
16
+ icon: "users",
17
+ },
18
+ })
21
19
 
22
- if Alchemy.respond_to?(:logout_method)
23
- Rails.application.config.after_initialize do
24
- Alchemy.logout_method = Devise.sign_out_via
25
- end
20
+ Alchemy.signup_path = "/admin/signup"
21
+ Alchemy.login_path = "/admin/login"
22
+ Alchemy.logout_path = "/admin/logout"
23
+ Alchemy.logout_method = Devise.sign_out_via
26
24
  end
@@ -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.user_class, id: user.id
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.user_class
18
+ can :read, Alchemy::User
19
19
  end
20
20
 
21
21
  if admin?
22
- can :manage, Alchemy.user_class
22
+ can :manage, Alchemy::User
23
23
  end
24
24
  end
25
25
 
@@ -7,6 +7,10 @@ module Alchemy
7
7
  isolate_namespace Alchemy
8
8
  engine_name 'alchemy_devise'
9
9
 
10
+ initializer "alchemy_devise.user_class", before: "alchemy.userstamp" do
11
+ Alchemy.user_class_name = "Alchemy::User"
12
+ end
13
+
10
14
  initializer 'alchemy_devise.assets' do |app|
11
15
  app.config.assets.precompile += [
12
16
  'alchemy-devise.css'
@@ -1,5 +1,5 @@
1
1
  module Alchemy
2
2
  module Devise
3
- VERSION = "5.0.0"
3
+ VERSION = "6.0.0"
4
4
  end
5
5
  end
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.0
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-22 00:00:00.000000000 Z
11
+ date: 2022-04-24 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: 4.1.0
19
+ version: 5.0.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5.1'
22
+ version: '6.1'
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: 4.1.0
29
+ version: 5.0.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5.1'
32
+ version: '6.1'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: devise
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
210
  - !ruby/object:Gem::Version
211
211
  version: '0'
212
212
  requirements: []
213
- rubygems_version: 3.1.4
213
+ rubygems_version: 3.1.6
214
214
  signing_key:
215
215
  specification_version: 4
216
216
  summary: Devise based user authentication for AlchemyCMS.