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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue