Add site setting to disable User Directory, include restricted info

This commit is contained in:
Robin Ward
2015-03-26 11:26:19 -04:00
parent e6ba3344fa
commit 2cc5858163
6 changed files with 21 additions and 2 deletions

View File

@ -11,6 +11,7 @@ describe DirectoryItemsController do
response.should_not be_success
end
context "without data" do
context "and a logged in user" do
@ -42,5 +43,12 @@ describe DirectoryItemsController do
json['total_rows_directory_items'].should be_present
json['load_more_directory_items'].should be_present
end
it "fails when the directory is disabled" do
SiteSetting.enable_user_directory = false
xhr :get, :index, period: 'all'
response.should_not be_success
end
end
end