discourse/spec/requests/api/schemas/json/group_response.json

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

392 lines
7.7 KiB
JSON
Raw Normal View History

{
"additionalProperties": false,
"properties": {
"group": {
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "integer"
},
"automatic": {
"type": "boolean"
},
"name": {
"type": "string"
},
"user_count": {
"type": "integer"
},
"mentionable_level": {
"type": "integer"
},
"messageable_level": {
"type": "integer"
},
"visibility_level": {
"type": "integer"
},
"primary_group": {
"type": "boolean"
},
"title": {
"type": [
"string",
"null"
]
},
"grant_trust_level": {
"type": [
"string",
"null"
]
},
"incoming_email": {
"type": [
"string",
"null"
]
},
"has_messages": {
"type": "boolean"
},
"flair_url": {
"type": [
"string",
"null"
]
},
"flair_bg_color": {
"type": [
"string",
"null"
]
},
"flair_color": {
"type": [
"string",
"null"
]
},
"bio_raw": {
"type": [
"string",
"null"
]
},
"bio_cooked": {
"type": [
"string",
"null"
]
},
"bio_excerpt": {
"type": [
"string",
"null"
]
},
"public_admission": {
"type": "boolean"
},
"public_exit": {
"type": "boolean"
},
"allow_membership_requests": {
"type": "boolean"
},
"full_name": {
"type": [
"string",
"null"
]
},
"default_notification_level": {
"type": "integer"
},
"membership_request_template": {
"type": [
"string",
"null"
]
},
"is_group_user": {
"type": "boolean"
},
"members_visibility_level": {
"type": "integer"
},
"can_see_members": {
"type": "boolean"
},
"can_admin_group": {
"type": "boolean"
},
"publish_read_state": {
"type": "boolean"
},
"is_group_owner_display": {
"type": "boolean"
},
"mentionable": {
"type": "boolean"
},
"messageable": {
"type": "boolean"
},
"automatic_membership_email_domains": {
"type": [
"string",
"null"
]
},
FEATURE: Improve group email settings UI (#13083) This overhauls the user interface for the group email settings management, aiming to make it a lot easier to test the settings entered and confirm they are correct before proceeding. We do this by forcing the user to test the settings before they can be saved to the database. It also includes some quality of life improvements around setting up IMAP and SMTP for our first supported provider, GMail. This PR does not remove the old group email config, that will come in a subsequent PR. This is related to https://meta.discourse.org/t/imap-support-for-group-inboxes/160588 so read that if you would like more backstory. ### UI Both site settings of `enable_imap` and `enable_smtp` must be true to test this. You must enable SMTP first to enable IMAP. You can prefill the SMTP settings with GMail configuration. To proceed with saving these settings you must test them, which is handled by the EmailSettingsValidator. If there is an issue with the configuration or credentials a meaningful error message should be shown. IMAP settings must also be validated when IMAP is enabled, before saving. When saving IMAP, we fetch the mailboxes for that account and populate them. This mailbox must be selected and saved for IMAP to work (the feature acts as though it is disabled until the mailbox is selected and saved): ### Database & Backend This adds several columns to the Groups table. The purpose of this change is to make it much more explicit that SMTP/IMAP is enabled for a group, rather than relying on settings not being null. Also included is an UPDATE query to backfill these columns. These columns are automatically filled when updating the group. For GMail, we now filter the mailboxes returned. This is so users cannot use a mailbox like Sent or Trash for syncing, which would generally be disastrous. There is a new group endpoint for testing email settings. This may be useful in the future for other places in our UI, at which point it can be extracted to a more generic endpoint or module to be included.
2021-05-27 19:28:18 -04:00
"smtp_updated_at": {
"type": [
"string",
"null"
]
},
"smtp_updated_by": {
"type": [
"object",
"null"
]
},
"smtp_enabled": {
"type": "boolean"
},
"smtp_server": {
"type": [
"string",
"null"
]
},
"smtp_port": {
"type": [
"string",
"null"
]
},
"smtp_ssl": {
"type": [
"string",
"null"
]
},
FEATURE: Improve group email settings UI (#13083) This overhauls the user interface for the group email settings management, aiming to make it a lot easier to test the settings entered and confirm they are correct before proceeding. We do this by forcing the user to test the settings before they can be saved to the database. It also includes some quality of life improvements around setting up IMAP and SMTP for our first supported provider, GMail. This PR does not remove the old group email config, that will come in a subsequent PR. This is related to https://meta.discourse.org/t/imap-support-for-group-inboxes/160588 so read that if you would like more backstory. ### UI Both site settings of `enable_imap` and `enable_smtp` must be true to test this. You must enable SMTP first to enable IMAP. You can prefill the SMTP settings with GMail configuration. To proceed with saving these settings you must test them, which is handled by the EmailSettingsValidator. If there is an issue with the configuration or credentials a meaningful error message should be shown. IMAP settings must also be validated when IMAP is enabled, before saving. When saving IMAP, we fetch the mailboxes for that account and populate them. This mailbox must be selected and saved for IMAP to work (the feature acts as though it is disabled until the mailbox is selected and saved): ### Database & Backend This adds several columns to the Groups table. The purpose of this change is to make it much more explicit that SMTP/IMAP is enabled for a group, rather than relying on settings not being null. Also included is an UPDATE query to backfill these columns. These columns are automatically filled when updating the group. For GMail, we now filter the mailboxes returned. This is so users cannot use a mailbox like Sent or Trash for syncing, which would generally be disastrous. There is a new group endpoint for testing email settings. This may be useful in the future for other places in our UI, at which point it can be extracted to a more generic endpoint or module to be included.
2021-05-27 19:28:18 -04:00
"imap_enabled": {
"type": "boolean"
},
"imap_updated_at": {
"type": [
"string",
"null"
]
},
"imap_updated_by": {
"type": [
"object",
"null"
]
},
"imap_server": {
"type": [
"string",
"null"
]
},
"imap_port": {
"type": [
"string",
"null"
]
},
"imap_ssl": {
"type": [
"string",
"null"
]
},
"imap_mailbox_name": {
"type": "string"
},
"imap_mailboxes": {
"type": "array",
"items": [
]
},
"email_username": {
"type": [
"string",
"null"
]
},
"email_password": {
"type": [
"string",
"null"
]
},
"imap_last_error": {
"type": [
"string",
"null"
]
},
"imap_old_emails": {
"type": [
"string",
"null"
]
},
"imap_new_emails": {
"type": [
"string",
"null"
]
},
"message_count": {
"type": "integer"
},
"allow_unknown_sender_topic_replies": {
"type": "boolean"
},
"watching_category_ids": {
"type": "array",
"items": [
]
},
"tracking_category_ids": {
"type": "array",
"items": [
]
},
"watching_first_post_category_ids": {
"type": "array",
"items": [
]
},
"regular_category_ids": {
"type": "array",
"items": [
]
},
"muted_category_ids": {
"type": "array",
"items": [
]
},
"watching_tags": {
"type": "array",
"items": [
]
},
"watching_first_post_tags": {
"type": "array",
"items": [
]
},
"tracking_tags": {
"type": "array",
"items": [
]
},
"regular_tags": {
"type": "array",
"items": [
]
},
"muted_tags": {
"type": "array",
"items": [
]
}
},
"required": [
"id",
"automatic",
"name",
"user_count",
"mentionable_level",
"messageable_level",
"visibility_level",
"primary_group",
"title",
"grant_trust_level",
"incoming_email",
"has_messages",
"flair_url",
"flair_bg_color",
"flair_color",
"bio_raw",
"bio_cooked",
"bio_excerpt",
"public_admission",
"public_exit",
"allow_membership_requests",
"full_name",
"default_notification_level",
"membership_request_template",
"is_group_user",
"members_visibility_level",
"can_see_members",
"can_admin_group",
"publish_read_state",
"is_group_owner_display",
"mentionable",
"messageable",
"automatic_membership_email_domains",
"smtp_server",
"smtp_port",
"smtp_ssl",
"imap_server",
"imap_port",
"imap_ssl",
"imap_mailbox_name",
"imap_mailboxes",
"email_username",
"email_password",
"imap_last_error",
"imap_old_emails",
"imap_new_emails",
"message_count",
"allow_unknown_sender_topic_replies",
"watching_category_ids",
"tracking_category_ids",
"watching_first_post_category_ids",
"regular_category_ids",
"muted_category_ids"
]
},
"extras": {
"type": "object",
"additionalProperties": false,
"properties": {
"visible_group_names": {
"type": "array",
"items": [
]
}
},
"required": [
"visible_group_names"
]
}
},
"required": [
"group",
"extras"
]
}