mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 08:54:23 -05:00
Added before filters add_customer, view_customer
This commit is contained in:
@@ -27,7 +27,8 @@ class CustomersController < ApplicationController
|
|||||||
include SortHelper
|
include SortHelper
|
||||||
helper :timelog
|
helper :timelog
|
||||||
|
|
||||||
before_filter :require_user
|
before_filter :add_customer, :only => :new
|
||||||
|
before_filter :view_customer, :except => :new
|
||||||
skip_before_filter :verify_authenticity_token, :check_if_login_required, :only => [:view]
|
skip_before_filter :verify_authenticity_token, :check_if_login_required, :only => [:view]
|
||||||
|
|
||||||
default_search_scope :names
|
default_search_scope :names
|
||||||
@@ -145,11 +146,11 @@ class CustomersController < ApplicationController
|
|||||||
private
|
private
|
||||||
|
|
||||||
def add_customer
|
def add_customer
|
||||||
check_permission(:add_customer)
|
global_check_permission(:add_customer)
|
||||||
end
|
end
|
||||||
|
|
||||||
def view_customer
|
def view_customer
|
||||||
check_permission(:view_customer)
|
global_check_permission(:view_customer)
|
||||||
end
|
end
|
||||||
|
|
||||||
def only_one_non_zero?( array )
|
def only_one_non_zero?( array )
|
||||||
|
|||||||
Reference in New Issue
Block a user