FEATURE: Admins should be able to create polls even when plugin is disabled.

This commit is contained in:
Guo Xiang Tan
2016-07-07 15:52:56 +08:00
parent 467b35df14
commit c3cab98998
10 changed files with 50 additions and 13 deletions

View File

@@ -68,6 +68,12 @@ module PrettyText
nil
end
end
def get_current_user(user_id)
user = User.find_by(id: user_id)
staff = user ? user.staff? : false
{ staff: staff }
end
end
end