clean up useless flash msgs. add i18n vars for app auth and object auth
This commit is contained in:
1 parent
05ded8de03
commit
f427c3803f
9 files changed
+43
-27
No files matched your search
@@ -57,7 +57,7 @@ class ApplicationController < ActionController::Base
|
||||
if is_admin?
|
||||
true
|
||||
else
|
||||
flash[:notice] = "Access Denied for you are not Admin"
|
||||
flash[:error] = t("admin.access.denied.not_admin")
|
||||
auth_failed_in_backend
|
||||
end
|
||||
end
|
||||
@@ -66,7 +66,7 @@ class ApplicationController < ActionController::Base
|
||||
if is_manager?
|
||||
true
|
||||
else
|
||||
flash[:notice] = "Access Denied for you are not Manager for this app"
|
||||
flash[:error] = t("admin.access.denied.app.not_manager")
|
||||
auth_failed_in_backend
|
||||
end
|
||||
end
|
||||
@@ -75,7 +75,7 @@ class ApplicationController < ActionController::Base
|
||||
if (@module_app.sub_managing_users.include?(current_user) || is_manager?)
|
||||
true
|
||||
else
|
||||
flash[:notice] = "Access Denied for you are not SubManager for this app"
|
||||
flash[:error] = t("admin.access.denied.app.not_sub_manager")
|
||||
auth_failed_in_backend
|
||||
end
|
||||
end
|
||||
@@ -84,13 +84,13 @@ class ApplicationController < ActionController::Base
|
||||
if (@module_app.app_auth.auth_users.include?(current_user) || for_app_sub_manager )
|
||||
true
|
||||
else
|
||||
flash[:notice] = "Access Denied for you are not User for this app"
|
||||
flash[:error] = t("admin.access.denied.app.not_authed_user")
|
||||
auth_failed_in_backend
|
||||
end
|
||||
end
|
||||
|
||||
def check_object_premission(obj,title)
|
||||
flash[:notice] = "Access Denied for you don't have permission for this object"
|
||||
flash[:error] = t("admin.access.denied.object")
|
||||
auth_failed_in_backend unless (obj.get_object_auth_by_title(title).auth_users.include?(current_user) || is_manager? || is_admin? )
|
||||
end
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
<%= flash_messages %>
|
||||
|
||||
<div id="isotope">
|
||||
<div class="item element">
|
||||
<h3><i class="icons-content"></i><a href=""><%= t(:content) %></a></h3>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<% content_for :page_specific_javascript do %>
|
||||
<%= javascript_include_tag "/static/kernel.js" %>
|
||||
<% end %>
|
||||
<%= flash_messages %>
|
||||
|
||||
<%= content_tag :li, :class => active_for_controllers('bulletins', '/panel/announcement/back_end/tags', 'bulletin_categorys','module_apps', 'approvals') do -%>
|
||||
<%= link_to content_tag(:i, nil, :class => 'icons-announcement') + t('admin.announcement'), panel_announcement_back_end_bulletins_path %>
|
||||
|
||||
Reference in new issue
Block a user