Fix #2772: Topics set as mod+ can't be reverted to public ones.

This commit is contained in:
evazion
2016-11-28 02:09:23 -06:00
parent daf1324ab2
commit 1cce721114
3 changed files with 9 additions and 9 deletions

View File

@@ -4,12 +4,6 @@ module ForumTopicsHelper
end
def available_min_user_levels
if CurrentUser.is_admin?
[["Moderator", User::Levels::MODERATOR], ["Admin", User::Levels::ADMIN]]
elsif CurrentUser.is_moderator?
[["Moderator", User::Levels::MODERATOR]]
else
[]
end
ForumTopic::MIN_LEVELS.select { |name, level| level <= CurrentUser.level }.to_a
end
end