Fixed suppliers module.
This commit is contained in:
parent
772cf87c92
commit
0b1682af7c
9 changed files with 56 additions and 87 deletions
|
|
@ -48,11 +48,11 @@ class ApplicationController < ActionController::Base
|
|||
# We have an authenticated user, now check role...
|
||||
# Roles gets the user through his memberships.
|
||||
hasRole = case role
|
||||
when "admin" then user.role_admin?
|
||||
when "finance" then user.role_finance?
|
||||
when "article_meta" then user.role_article_meta?
|
||||
when "suppliers" then user.role_suppliers?
|
||||
when "orders" then user.role_orders?
|
||||
when "admin" then current_user.role_admin?
|
||||
when "finance" then current_user.role_finance?
|
||||
when "article_meta" then current_user.role_article_meta?
|
||||
when "suppliers" then current_user.role_suppliers?
|
||||
when "orders" then current_user.role_orders?
|
||||
when "any" then true # no role required
|
||||
else false # any unknown role will always fail
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@ class OrderingController < ApplicationController
|
|||
before_filter :ensure_ordergroup_member
|
||||
before_filter :ensure_open_order, :only => [:order, :stock_order, :saveOrder]
|
||||
|
||||
verify :method => :post, :only => [:saveOrder], :redirect_to => {:action => :index}
|
||||
|
||||
# Index page.
|
||||
def index
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ class SuppliersController < ApplicationController
|
|||
helper :deliveries
|
||||
|
||||
def index
|
||||
@suppliers = Supplier.without_deleted :order => 'name'
|
||||
@suppliers = Supplier.order(:name)
|
||||
@deliveries = Delivery.recent
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue