---
src/app/controllers/realms_controller.rb | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/app/controllers/realms_controller.rb
b/src/app/controllers/realms_controller.rb
index 86f5b6a..859a3a3 100644
--- a/src/app/controllers/realms_controller.rb
+++ b/src/app/controllers/realms_controller.rb
@@ -109,6 +109,7 @@ class RealmsController < ApplicationController
def show
@realm = FrontendRealm.find(params[:id])
+ require_privilege(Privilege::VIEW, @realm.provider)
@title = @realm.name
@tab_captions = [t('realms.tab_captions.properties'),
t('realms.tab_captions.mapping')]
@details_tab = params[:details_tab].blank? ? 'properties' :
params[:details_tab]
@@ -152,5 +153,6 @@ class RealmsController < ApplicationController
{:name => t("realms.index.realm_name"), :sort_attr => :name},
]
@realms = FrontendRealm.apply_filters(:preset_filter_id =>
params[:realms_preset_filter], :search_filter => params[:realms_search])
+ @realms.reject! { |realm| !check_privilege(Privilege::VIEW, realm.provider) }
end
end
--
1.7.6.5