diff --git a/.golangci.yml b/.golangci.yml index 2c93dfe..a0d4170 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -29,7 +29,6 @@ linters: - ineffassign - misspell - nakedret - - revive - staticcheck - stylecheck - typecheck diff --git a/README.md b/README.md index 717afba..74652f4 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,17 @@ A Mattermost plugin for Confluence. Supports Confluence Cloud, Server, and Data With the Confluence plugin, you can subscribe to a variety of events in Confluence, and specify which channels the associated notifications will appear in. - In a Mattermost channel, setup subscriptions to get updates from Confluence and manage your notification subscriptions directly within Mattermost. -- Notify a channel whenever something occurs on a Confluence object: - - Confluence spaces, including those created, updated, deleted, and restored, and those with added comments. - - Confluence pages, including those created, updated, deleted, restored, and those with added, deleted, or updated comments. +- Notify a channel whenever something occurs on a Confluence object, we support the following events: + - space_updated + - page_created + - page_restored + - page_trashed + - page_updated + - comment_created + - comment_updated +- Users can only create subscriptions for the spaces and pages for which they have permission and same for the notifications as well. +- Admins can change permissions for both Mattermost and Confluence side from the plugin configuration. + ![image](https://github.com/Brightscout/mattermost-plugin-confluence-fork/assets/90389917/b94fbf84-f345-4ded-aa8d-21de1b870062) ## Configure notifications @@ -46,9 +54,13 @@ With the Confluence plugin, you can subscribe to a variety of events in Confluen ![image](https://github.com/mattermost/mattermost-plugin-confluence/assets/74422101/9314abd2-8562-456e-9661-7f23c91db206) - `Events` are the internal confluence events that will trigger a notification from Confluence. The following events are currently included: - - Confluence spaces, including those created, updated, deleted, and restored, and those with added comments. - - Confluence pages, inlcuidng those created, updated, deleted, restored, and those with added, deleted, or updated comments. - + - space_updated + - page_created + - page_restored + - page_trashed + - page_updated + - comment_created + - comment_updated Example of a configured notification: ![image](https://github.com/mattermost/mattermost-plugin-confluence/assets/74422101/33bc67f8-8d36-4e79-a386-7791f4dcd1ee) diff --git a/plugin.json b/plugin.json index e0c0486..365cb7f 100644 --- a/plugin.json +++ b/plugin.json @@ -33,7 +33,7 @@ "key": "RolesAllowedToEditConfluenceSubscriptions", "display_name": "Mattermost Roles Allowed to Edit Confluence Subscriptions:", "type": "radio", - "help_text": "Mattermost users who can subscribe channels to confluence space or page.", + "help_text": "Mattermost users who can subscribe channels to Confluence space or page.", "placeholder": "", "default": "system_admin", "options": [ diff --git a/server/get_subscription.go b/server/get_subscription.go index 7ea4627..86c48b5 100644 --- a/server/get_subscription.go +++ b/server/get_subscription.go @@ -10,7 +10,7 @@ import ( ) var GetChannelSubscription = &Endpoint{ - RequiresAdmin: true, + RequiresAdmin: false, Path: "/{channelID:[A-Za-z0-9]+}/subscription", Method: http.MethodGet, Execute: handleGetChannelSubscription, diff --git a/server/manifest.go b/server/manifest.go index c3488dd..1a447dc 100644 --- a/server/manifest.go +++ b/server/manifest.go @@ -49,7 +49,7 @@ const manifestStr = ` "key": "RolesAllowedToEditConfluenceSubscriptions", "display_name": "Mattermost Roles Allowed to Edit Confluence Subscriptions:", "type": "radio", - "help_text": "Mattermost users who can subscribe channels to confluence space or page.", + "help_text": "Mattermost users who can subscribe channels to Confluence space or page.", "placeholder": "", "default": "system_admin", "options": [ diff --git a/webapp/src/manifest.js b/webapp/src/manifest.js index 828e7e7..612972a 100644 --- a/webapp/src/manifest.js +++ b/webapp/src/manifest.js @@ -38,7 +38,7 @@ const manifest = JSON.parse(` "key": "RolesAllowedToEditConfluenceSubscriptions", "display_name": "Mattermost Roles Allowed to Edit Confluence Subscriptions:", "type": "radio", - "help_text": "Mattermost users who can subscribe channels to confluence space or page.", + "help_text": "Mattermost users who can subscribe channels to Confluence space or page.", "placeholder": "", "default": "system_admin", "options": [