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