oxen_account 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/app/assets/javascripts/oxen_account.js +3 -0
- data/app/assets/javascripts/pw_strength.js.coffee +24 -0
- data/app/assets/javascripts/zxcvbn.js +43 -0
- data/app/controllers/{accounts_controller.rb → accounts/base/accounts_controller.rb} +1 -1
- data/app/controllers/users/base/users_controller.rb +1 -1
- data/app/policies/account_policy.rb +8 -7
- data/app/policies/user_policy.rb +1 -0
- data/app/views/users/_account_user.html.haml +6 -0
- data/app/views/users/_account_users.html.haml +2 -0
- data/app/views/users/invitations/_new.html.haml +2 -1
- data/config/initializers/devise.rb +1 -1
- data/lib/oxen_account/version.rb +1 -1
- data/lib/oxen_account.rb +4 -1
- data/oxen_account-0.1.0.gem +0 -0
- data/oxen_account.gemspec +5 -5
- metadata +8 -4
@@ -1,14 +1,15 @@
|
|
1
1
|
class AccountPolicy < AbstractResourcePolicy
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
class Scope < Scope
|
4
|
+
def resolve
|
5
|
+
return Account.where(1==2) if current_user.nil?
|
6
|
+
if current_user.admin?
|
7
|
+
scope.all
|
8
|
+
else
|
9
|
+
scope.where(id: current_user.account.id)
|
10
10
|
end
|
11
11
|
end
|
12
|
+
end
|
12
13
|
|
13
14
|
|
14
15
|
|
data/app/policies/user_policy.rb
CHANGED
@@ -4,3 +4,9 @@
|
|
4
4
|
%td
|
5
5
|
- if user.active
|
6
6
|
%i.mdi-action-done.small
|
7
|
+
%td
|
8
|
+
- if user.confirmed?
|
9
|
+
%i.mdi-action-done.small
|
10
|
+
%td
|
11
|
+
= link_to user, class: 'delete_link', data: { url: '/admin/users', name: "#{user.name}", id: "#{user.id}", remove: "#tr-#{user.id}" } do
|
12
|
+
%i.mdi-action-delete.small{ title: "#{t('.delete')}"}
|
@@ -26,11 +26,12 @@
|
|
26
26
|
$form = $(e.target).closest('form')
|
27
27
|
data = $form.serialize()
|
28
28
|
jqxhr = $.ajax
|
29
|
-
url: '/users/invitation',
|
29
|
+
url: '/users/invitation.js',
|
30
30
|
type: 'post',
|
31
31
|
data: data
|
32
32
|
.done (response) ->
|
33
33
|
$('#account_users').append(response)
|
34
|
+
initializeDeleteLinks()
|
34
35
|
fadeItOut $('.message_container .alert-success')
|
35
36
|
.fail (response) ->
|
36
37
|
$('body').append(response.responseText)
|
@@ -11,7 +11,7 @@ Devise.setup do |config|
|
|
11
11
|
# Configure the e-mail address which will be shown in Devise::Mailer,
|
12
12
|
# note that it will be overwritten if you use your own mailer class
|
13
13
|
# with default "from" parameter.
|
14
|
-
config.mailer_sender = 'no-reply@' + Rails.application.secrets.domain_name
|
14
|
+
# config.mailer_sender = 'no-reply@' + Rails.application.secrets.domain_name
|
15
15
|
|
16
16
|
# Configure the class responsible to send e-mails.
|
17
17
|
# config.mailer = 'Devise::Mailer'
|
data/lib/oxen_account/version.rb
CHANGED
data/lib/oxen_account.rb
CHANGED
Binary file
|
data/oxen_account.gemspec
CHANGED
@@ -23,12 +23,12 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
|
-
spec.
|
27
|
-
spec.
|
28
|
-
spec.
|
26
|
+
spec.add_dependency 'devise'
|
27
|
+
spec.add_dependency 'devise_invitable'
|
28
|
+
spec.add_dependency 'devise_zxcvbn'
|
29
29
|
|
30
|
-
spec.
|
31
|
-
spec.
|
30
|
+
spec.add_dependency "paper_trail"
|
31
|
+
spec.add_dependency 'pundit'
|
32
32
|
|
33
33
|
spec.add_development_dependency "bundler", "~> 1.8"
|
34
34
|
spec.add_development_dependency "rake", "~> 10.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oxen_account
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Walther H Diechmann
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|
@@ -308,7 +308,10 @@ files:
|
|
308
308
|
- LICENSE.txt
|
309
309
|
- README.md
|
310
310
|
- Rakefile
|
311
|
-
- app/
|
311
|
+
- app/assets/javascripts/oxen_account.js
|
312
|
+
- app/assets/javascripts/pw_strength.js.coffee
|
313
|
+
- app/assets/javascripts/zxcvbn.js
|
314
|
+
- app/controllers/accounts/base/accounts_controller.rb
|
312
315
|
- app/controllers/users/base/invitations_controller.rb
|
313
316
|
- app/controllers/users/base/users_controller.rb
|
314
317
|
- app/helpers/accounts_helper.rb
|
@@ -353,6 +356,7 @@ files:
|
|
353
356
|
- lib/oxen_account.rb
|
354
357
|
- lib/oxen_account/engine.rb
|
355
358
|
- lib/oxen_account/version.rb
|
359
|
+
- oxen_account-0.1.0.gem
|
356
360
|
- oxen_account.gemspec
|
357
361
|
homepage: http://gitserver.alco.dk/oxen_account
|
358
362
|
licenses:
|
@@ -374,7 +378,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
374
378
|
version: '0'
|
375
379
|
requirements: []
|
376
380
|
rubyforge_project:
|
377
|
-
rubygems_version: 2.
|
381
|
+
rubygems_version: 2.2.2
|
378
382
|
signing_key:
|
379
383
|
specification_version: 4
|
380
384
|
summary: Offers an account table for customer accounts
|