Users: add Contributor and Approver user levels

This commit is contained in:
nonamethanks
2022-10-21 14:59:15 +02:00
parent f092bc28ee
commit ca31e7a47c
29 changed files with 105 additions and 251 deletions

View File

@@ -15,20 +15,6 @@ class UserPresenter
user.created_at.strftime("%Y-%m-%d")
end
def permissions
permissions = []
if user.can_approve_posts?
permissions << "approve posts"
end
if user.can_upload_free?
permissions << "unrestricted uploads"
end
permissions.join(", ")
end
def posts_for_saved_search_category(category)
Post.user_tag_match("search:#{category}").limit(10)
end