SECURITY: reduce moderator rights

You can now hide particular categories from certain moderators
This commit is contained in:
Sam
2014-02-07 14:11:52 +11:00
parent e133c82d4b
commit 93434be16d
8 changed files with 39 additions and 19 deletions

View File

@ -9,7 +9,7 @@ describe CategoriesController do
describe "logged in" do
before do
@user = log_in(:moderator)
@user = log_in(:admin)
end
it "raises an exception when they don't have permission to create it" do
@ -106,7 +106,7 @@ describe CategoriesController do
let(:valid_attrs) { {id: @category.id, name: "hello", color: "ff0", text_color: "fff"} }
before do
@user = log_in(:moderator)
@user = log_in(:admin)
@category = Fabricate(:category, user: @user)
end