Display user permissions in API results

Fixes #2640
This commit is contained in:
Type-kun
2016-08-26 21:51:33 +05:00
parent f41c362bf4
commit ffbf6b6fa0

View File

@@ -616,7 +616,7 @@ class User < ActiveRecord::Base
end
def method_attributes
list = [:is_banned, :level_string]
list = [:is_banned, :can_approve_posts, :can_upload_free, :level_string]
if id == CurrentUser.user.id
list += [:remaining_api_hourly_limit]
end