diff --git a/app/presenters/user_presenter.rb b/app/presenters/user_presenter.rb index 7b2adb823..62e1cd517 100644 --- a/app/presenters/user_presenter.rb +++ b/app/presenters/user_presenter.rb @@ -25,6 +25,16 @@ class UserPresenter end end + def permissions + permissions = [] + + if user.can_approve_posts? + permissions << "approve posts" + end + + permissions.join(", ") + end + def posts_for_subscription(subscription) arel = Post.where("id in (?)", subscription.post_id_array.map(&:to_i)).order("id desc").limit(6) diff --git a/app/views/users/_statistics.html.erb b/app/views/users/_statistics.html.erb index 1bb2d887b..213faa3a9 100644 --- a/app/views/users/_statistics.html.erb +++ b/app/views/users/_statistics.html.erb @@ -17,6 +17,11 @@