mix-rails-auth 0.23.1 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/app/views/admix/roles/_form_config.haml +4 -0
- data/app/views/admix/users/_form_config.haml +7 -0
- data/config/locales/auth.pt-BR.yml +1 -0
- data/config/routes.rb +1 -1
- data/lib/mix-rails-auth/engine.rb +7 -16
- data/lib/mix-rails-auth/version.rb +2 -2
- metadata +11 -28
- data/app/models/admix/roles_datagrid.rb +0 -14
- data/app/models/admix/users_datagrid.rb +0 -19
- data/app/views/admix/roles/_form_fields.html.haml +0 -2
- data/app/views/admix/users/_form_fields.html.haml +0 -3
- data/app/views/admix/users/_table_actions.html.haml +0 -3
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1dae86d5c3cfcc7315de717b6d973a875fc003bd
|
4
|
+
data.tar.gz: dc8bde280f4b9264137383ecc9a23d1e9b0e529e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4534840081a1e70cf3e51da2c93f740752a40aef074992a28b4755c404abd83895da4726cf6b7b4bdf27f4a4065a211815d8b9725f871ddde110ee111e880cd8
|
7
|
+
data.tar.gz: 73e58415ce9e9c7e548d1fc446458df6a68c01a3804c73634cce4cee276330b2dd1a2ef2befa8cfbefee75f6f4c74db937d5e9ef13524eddb78c36861236694a
|
data/config/routes.rb
CHANGED
@@ -3,7 +3,7 @@ Rails.application.routes.draw do
|
|
3
3
|
devise_for :users, sign_out_via: 'get'
|
4
4
|
|
5
5
|
scope Admix::namespace_path, as: :admix, module: :admix do
|
6
|
-
devise_for :users, sign_out_via: 'get', controllers: {sessions: 'admix/sessions', passwords: 'admix/passwords'}, :path_names => { :sign_in => 'login', :sign_out => 'logout' }
|
6
|
+
devise_for :users, sign_out_via: 'get', controllers: {sessions: 'admix/sessions', passwords: 'admix/passwords'}, :path_names => { :sign_in => 'login', :sign_out => 'logout', :registration => 'register' }
|
7
7
|
resources :users
|
8
8
|
resources :roles
|
9
9
|
end
|
@@ -6,22 +6,13 @@ module MixRailsAuth
|
|
6
6
|
g.integration_tool :rspec
|
7
7
|
end
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
submenu.url = 'admix_users_url'
|
17
|
-
|
18
|
-
submenu.instance_eval do
|
19
|
-
def can_render?(current_user)
|
20
|
-
current_user.has_role? :admin
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
9
|
+
initializer "mix-rails-writer.setup_menu", after: "admix.setup_menu" do
|
10
|
+
ActiveMenu::get('admix-nav') do |nav|
|
11
|
+
nav.get(:general) do |general|
|
12
|
+
general.child :users do |users|
|
13
|
+
users.text Proc.new {t('users.users')}
|
14
|
+
users.href Proc.new {admix_users_url}
|
15
|
+
users.visible Proc.new {current_user.has_role? :admin}
|
25
16
|
end
|
26
17
|
end
|
27
18
|
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mix-rails-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.24.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Sadjow
|
@@ -10,12 +9,11 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2013-
|
12
|
+
date: 2013-03-12 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: rails
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
18
|
- - ~>
|
21
19
|
- !ruby/object:Gem::Version
|
@@ -23,7 +21,6 @@ dependencies:
|
|
23
21
|
type: :runtime
|
24
22
|
prerelease: false
|
25
23
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
24
|
requirements:
|
28
25
|
- - ~>
|
29
26
|
- !ruby/object:Gem::Version
|
@@ -31,7 +28,6 @@ dependencies:
|
|
31
28
|
- !ruby/object:Gem::Dependency
|
32
29
|
name: devise
|
33
30
|
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
31
|
requirements:
|
36
32
|
- - ~>
|
37
33
|
- !ruby/object:Gem::Version
|
@@ -39,7 +35,6 @@ dependencies:
|
|
39
35
|
type: :runtime
|
40
36
|
prerelease: false
|
41
37
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
38
|
requirements:
|
44
39
|
- - ~>
|
45
40
|
- !ruby/object:Gem::Version
|
@@ -47,17 +42,15 @@ dependencies:
|
|
47
42
|
- !ruby/object:Gem::Dependency
|
48
43
|
name: devise-i18n
|
49
44
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
45
|
requirements:
|
52
|
-
- -
|
46
|
+
- - '>='
|
53
47
|
- !ruby/object:Gem::Version
|
54
48
|
version: '0'
|
55
49
|
type: :runtime
|
56
50
|
prerelease: false
|
57
51
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
52
|
requirements:
|
60
|
-
- -
|
53
|
+
- - '>='
|
61
54
|
- !ruby/object:Gem::Version
|
62
55
|
version: '0'
|
63
56
|
description: This is the auth module of mix-rails
|
@@ -73,16 +66,13 @@ files:
|
|
73
66
|
- app/assets/stylesheets/admix/users.css
|
74
67
|
- app/assets/javascripts/admix/users.js
|
75
68
|
- app/helpers/admix/users_helper.rb
|
76
|
-
- app/models/admix/roles_datagrid.rb
|
77
|
-
- app/models/admix/users_datagrid.rb
|
78
69
|
- app/models/user.rb
|
79
70
|
- app/models/role.rb
|
80
71
|
- app/views/admix/roles/_show.html.haml
|
81
72
|
- app/views/admix/roles/_table_actions.html.haml
|
82
|
-
- app/views/admix/roles/
|
73
|
+
- app/views/admix/roles/_form_config.haml
|
83
74
|
- app/views/admix/users/_show.html.haml
|
84
|
-
- app/views/admix/users/
|
85
|
-
- app/views/admix/users/_form_fields.html.haml
|
75
|
+
- app/views/admix/users/_form_config.haml
|
86
76
|
- config/sessions.rb
|
87
77
|
- config/locales/auth.en.yml
|
88
78
|
- config/locales/devise.pt-BR.yml
|
@@ -102,32 +92,25 @@ files:
|
|
102
92
|
- README.rdoc
|
103
93
|
homepage: http://github.com/mixinternet/mix-rails
|
104
94
|
licenses: []
|
95
|
+
metadata: {}
|
105
96
|
post_install_message:
|
106
97
|
rdoc_options: []
|
107
98
|
require_paths:
|
108
99
|
- lib
|
109
100
|
required_ruby_version: !ruby/object:Gem::Requirement
|
110
|
-
none: false
|
111
101
|
requirements:
|
112
|
-
- -
|
102
|
+
- - '>='
|
113
103
|
- !ruby/object:Gem::Version
|
114
104
|
version: '0'
|
115
|
-
segments:
|
116
|
-
- 0
|
117
|
-
hash: -3816868220446999890
|
118
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
|
-
none: false
|
120
106
|
requirements:
|
121
|
-
- -
|
107
|
+
- - '>='
|
122
108
|
- !ruby/object:Gem::Version
|
123
109
|
version: '0'
|
124
|
-
segments:
|
125
|
-
- 0
|
126
|
-
hash: -3816868220446999890
|
127
110
|
requirements: []
|
128
111
|
rubyforge_project:
|
129
|
-
rubygems_version:
|
112
|
+
rubygems_version: 2.0.0
|
130
113
|
signing_key:
|
131
|
-
specification_version:
|
114
|
+
specification_version: 4
|
132
115
|
summary: This is the auth module of mix-rails
|
133
116
|
test_files: []
|
@@ -1,19 +0,0 @@
|
|
1
|
-
class Admix::UsersDatagrid
|
2
|
-
|
3
|
-
include Datagrid
|
4
|
-
|
5
|
-
scope do
|
6
|
-
User
|
7
|
-
end
|
8
|
-
|
9
|
-
filter :email, :string
|
10
|
-
filter :last_sign_in_at, :date
|
11
|
-
|
12
|
-
column :email, header: I18n.t('users.fields.email')
|
13
|
-
column :last_sign_in_at, header: I18n.t('users.fields.last_sign_in_at') do |user|
|
14
|
-
user.last_sign_in_at.strftime('%d/%m/%Y as %H:%Mh')
|
15
|
-
end
|
16
|
-
|
17
|
-
include Admix::TableActions
|
18
|
-
|
19
|
-
end
|
@@ -1,3 +0,0 @@
|
|
1
|
-
= link_to image_tag('admix/zoom.png'), resource_url(resource), class: 'btn', title:'Visualizar'
|
2
|
-
= link_to image_tag('admix/page_edit.png'), edit_resource_url(resource), class: 'btn', title:'Editar'
|
3
|
-
= link_to image_tag('admix/cancel.png'), resource_url(resource), method: :delete, data: { confirm: t('admix.crud.destroy_confirm') }, class: 'btn', title:'Deletar'
|