Updating settings & fixing auth of objects through other objects cancan bug?

This commit is contained in:
2013-09-28 19:31:28 -07:00
parent 9e08a0d036
commit 42679aa410
7 changed files with 14 additions and 39 deletions

View File

@@ -1,6 +1,6 @@
class CertificationsController < ApplicationController
load_and_authorize_resource :certification
load_and_authorize_resource :user, :through => :certification
#load_and_authorize_resource :user, :through => :certification
before_filter :authenticate_user!
# GET /certifications

View File

@@ -1,7 +1,7 @@
class UserCertificationsController < ApplicationController
load_and_authorize_resource :user_certification
load_and_authorize_resource :user, :through => :user_certification
load_and_authorize_resource :certification, :through => :user_certification
#load_and_authorize_resource :user, :through => :user_certification
#load_and_authorize_resource :certification, :through => :user_certification
before_filter :authenticate_user!
# Load users and certs based on current ability