mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
FEATURE - Moderators can create and manage groups (#10432)
Enabling the moderators_manage_categories_and_groups site setting will allow moderator users to create/manage groups. * show New Group form to moderators * Allow moderators to update groups and read logs, where appropriate * Rename site setting from create -> manage * improved tests * Migration should rename old log entries * Log group changes, even if those changes mean you can no longer see the group * Slight reshuffle * RouteTo /g if they no longer have permissions to view group
This commit is contained in:
@ -38,6 +38,7 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
:seen_notification_id,
|
||||
:primary_group_id,
|
||||
:can_create_topic,
|
||||
:can_create_group,
|
||||
:link_posting_access,
|
||||
:external_id,
|
||||
:top_category_ids,
|
||||
@ -62,6 +63,14 @@ class CurrentUserSerializer < BasicUserSerializer
|
||||
scope.can_create_topic?(nil)
|
||||
end
|
||||
|
||||
def can_create_group
|
||||
scope.can_create_group?
|
||||
end
|
||||
|
||||
def include_can_create_group?
|
||||
scope.can_create_group?
|
||||
end
|
||||
|
||||
def read_faq
|
||||
object.user_stat.read_faq?
|
||||
end
|
||||
|
Reference in New Issue
Block a user