fixes #139: New forum threads submitted locked/stickied are neither.

This commit is contained in:
albert
2011-10-17 00:13:36 -04:00
parent 3feeaf02e3
commit eee3351c0f
5 changed files with 31 additions and 2 deletions

View File

@@ -199,6 +199,28 @@ class User < ActiveRecord::Base
end
end
def role
case level
when Levels::MEMBER
:member
when Levels::PRIVILEGED
:privileged
when Levels::CONTRIBUTOR
:contributor
when Levels::JANITOR
:janitor
when Levels::MODERATOR
:moderator
when Levels::ADMIN
:admin
end
end
def level_string
case level
when Levels::MEMBER