vigilante 1.0.13 → 1.0.14

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
  SHA1:
3
- metadata.gz: 13a453a54282b105475ead0fca3e6456f14e4031
4
- data.tar.gz: b47cfb8ad4ada90f963b107f095aa394b9209db2
3
+ metadata.gz: ddc0834ce72c5fbfb7b2ede2ac5bffd5005cbc3d
4
+ data.tar.gz: 7a50a11c2d8ba3ede9bcacbd2a043b2f71e21885
5
5
  SHA512:
6
- metadata.gz: e4d14427df8937a81939043e88dcb9732fd9678aed159bb674ca8867b3f9bca36a7acb10c2bd9d5720d54d030c2f4f0658299f43218b153fd47f84ba58f9c114
7
- data.tar.gz: 08bee54f39b0be0d5e04bddbe5687bc6d9f76ff5350373901237219d2a7f15e741c25726225c30f66c879037d2cedf70aef249a7c0e8e2a9c5228e7904486a9b
6
+ metadata.gz: e0d54b2c0e854758adfdfb44a79e850f7abcffb424db3da7c560f13046f93875c7bdaabac4ca9a8dce0b722a608205e5d37cc555d955db3da5d9bfe9ec5e3747
7
+ data.tar.gz: bf88e031f331480cc465fed1162d34588aec583149aed539e88c135e50428c160707c90bdd2c3114aa522eede1c2ea24152942ee824d740aeba3e9319d5a5bf2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.13
1
+ 1.0.14
@@ -15,7 +15,7 @@ class AbilitiesController < ApplicationController
15
15
  end
16
16
 
17
17
  def create
18
- @ability = Ability.new(params[:ability])
18
+ @ability = Ability.new(ability_params)
19
19
  if @ability.save
20
20
  flash[:notice] = t('ability.created')
21
21
  redirect_to :action => :index
@@ -32,7 +32,7 @@ class AbilitiesController < ApplicationController
32
32
  def update
33
33
  @ability = Ability.find(params[:id])
34
34
 
35
- if @ability.update_attributes(params[:ability])
35
+ if @ability.update_attributes(ability_params)
36
36
  flash[:notice] = t('ability.saved')
37
37
  redirect_to :action => :index
38
38
  else
@@ -40,7 +40,15 @@ class AbilitiesController < ApplicationController
40
40
  end
41
41
  end
42
42
 
43
- private
43
+ protected
44
+
45
+ def ability_params
46
+ params.require(:ability).permit(:name, :description,
47
+ :ability_permissions_attributes => [:id, :permission_id, :_destroy,
48
+ :permission_attributes => [:id, :allowed_action, :_destroy]
49
+ ]
50
+ )
51
+ end
44
52
 
45
53
 
46
54
  end
data/vigilante.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: vigilante 1.0.13 ruby lib
5
+ # stub: vigilante 1.0.14 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "vigilante"
9
- s.version = "1.0.13"
9
+ s.version = "1.0.14"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Nathan Van der Auwera"]
14
- s.date = "2016-12-15"
14
+ s.date = "2017-03-21"
15
15
  s.description = "Vigilante is a db-backed authorisation, completely configurable and dynamic; where permissions can be limited to extents."
16
16
  s.email = "nathan@dixis.com"
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vigilante
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.13
4
+ version: 1.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Van der Auwera
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-15 00:00:00.000000000 Z
11
+ date: 2017-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails