go_gamification 0.0.17 → 0.0.18
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/app/controllers/gamification/inventories_controller.rb +4 -0
- data/app/controllers/gamification/item_groups_controller.rb +4 -1
- data/app/controllers/gamification/item_types_controller.rb +4 -1
- data/app/controllers/gamification/items_controller.rb +4 -1
- data/app/controllers/gamification/levels_controller.rb +5 -2
- data/app/controllers/gamification/rewards_controller.rb +2 -0
- data/lib/go_gamification/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c06f74bd183f59f37f66f0db1a1aa0df7580decc
|
4
|
+
data.tar.gz: b08c33ce22d0663f633d1b4cb5f064623237c1ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f61b58088473e21be41c844c70931ed9c710a11cea7ce168ee78d401f22a4252a983a9c7dc3f7429fdedefda252840649b843a6ad09ce42d1184e79e8b5ee915
|
7
|
+
data.tar.gz: 6d3acf5bd7f98bc78176eb02f9c99401167239796e4f03c81e3db8cb50aef8acca78bca3b9d3f50c422b17ea5d99031d2ebc80e6f321ac6c689a0965df474c03
|
@@ -1,6 +1,8 @@
|
|
1
1
|
class Gamification::InventoriesController < ApplicationController
|
2
2
|
before_action :set_gamification_inventory, only: [:show, :edit, :update, :destroy]
|
3
3
|
before_action :set_user, only: [:update]
|
4
|
+
before_action :authenticate_user!
|
5
|
+
load_and_authorize_resource except: [:create]
|
4
6
|
|
5
7
|
# GET /gamification/inventories
|
6
8
|
def index
|
@@ -22,6 +24,8 @@ class Gamification::InventoriesController < ApplicationController
|
|
22
24
|
|
23
25
|
# POST /gamification/inventories
|
24
26
|
def create
|
27
|
+
authorize! :create, @gamification_inventory
|
28
|
+
|
25
29
|
@gamification_inventory = Gamification::Inventory.new(inventory_params)
|
26
30
|
|
27
31
|
if @gamification_inventory.save
|
@@ -1,6 +1,7 @@
|
|
1
1
|
class Gamification::ItemGroupsController < ApplicationController
|
2
2
|
before_action :set_gamification_item_group, only: [:show, :edit, :update, :destroy]
|
3
|
-
|
3
|
+
before_action :authenticate_user!
|
4
|
+
load_and_authorize_resource except: [:create]
|
4
5
|
# GET /gamification/item_groups
|
5
6
|
def index
|
6
7
|
@gamification_item_groups = Gamification::ItemGroup.all
|
@@ -21,6 +22,8 @@ class Gamification::ItemGroupsController < ApplicationController
|
|
21
22
|
|
22
23
|
# POST /gamification/item_groups
|
23
24
|
def create
|
25
|
+
authorize! :create, @gamification_item_group
|
26
|
+
|
24
27
|
@gamification_item_group = Gamification::ItemGroup.new(gamification_item_group_params)
|
25
28
|
|
26
29
|
if @gamification_item_group.save
|
@@ -1,6 +1,7 @@
|
|
1
1
|
class Gamification::ItemTypesController < ApplicationController
|
2
2
|
before_action :set_gamification_item_type, only: [:show, :edit, :update, :destroy]
|
3
|
-
|
3
|
+
before_action :authenticate_user!
|
4
|
+
load_and_authorize_resource except: [:create]
|
4
5
|
# GET /gamification/item_types
|
5
6
|
def index
|
6
7
|
@gamification_item_types = Gamification::ItemType.all
|
@@ -21,6 +22,8 @@ class Gamification::ItemTypesController < ApplicationController
|
|
21
22
|
|
22
23
|
# POST /gamification/item_types
|
23
24
|
def create
|
25
|
+
authorize! :create, @gamification_item_type
|
26
|
+
|
24
27
|
@gamification_item_type = Gamification::ItemType.new(gamification_item_type_params)
|
25
28
|
|
26
29
|
if @gamification_item_type.save
|
@@ -1,6 +1,7 @@
|
|
1
1
|
class Gamification::ItemsController < ApplicationController
|
2
2
|
before_action :set_gamification_item, only: [:show, :edit, :update, :destroy]
|
3
|
-
|
3
|
+
before_action :authenticate_user!
|
4
|
+
load_and_authorize_resource except: [:create]
|
4
5
|
# GET /gamification/items
|
5
6
|
def index
|
6
7
|
@gamification_items = Gamification::Item.all
|
@@ -21,6 +22,8 @@ class Gamification::ItemsController < ApplicationController
|
|
21
22
|
|
22
23
|
# POST /gamification/items
|
23
24
|
def create
|
25
|
+
authorize! :create, @gamification_item
|
26
|
+
|
24
27
|
@gamification_item = Gamification::Item.new(gamification_item_params)
|
25
28
|
|
26
29
|
if @gamification_item.save
|
@@ -1,7 +1,8 @@
|
|
1
1
|
module Gamification
|
2
2
|
class LevelsController < ApplicationController
|
3
|
-
|
4
|
-
before_action :
|
3
|
+
before_action :authenticate_user!, except: [:list, :show_list]
|
4
|
+
before_action :authenticate_user!
|
5
|
+
load_and_authorize_resource except: [:create]
|
5
6
|
|
6
7
|
# GET /levels
|
7
8
|
def index
|
@@ -23,6 +24,8 @@ module Gamification
|
|
23
24
|
|
24
25
|
# POST /levels
|
25
26
|
def create
|
27
|
+
authorize! :create, @level
|
28
|
+
|
26
29
|
@level = Level.new(level_params)
|
27
30
|
|
28
31
|
if @level.save
|