MM-53358: Revert Threads Everywhere (#23882)
Remove changes related to the unshipped threads everywhere feature, including commitsb8da473da7and9f9e19e05d. Since a version of Playbooks shipped calling this experimental API, keep a `nil` implementation to avoid breaking compatibility. We remove the hooks altogether, but keep the numbering again to avoid breaking compatbility. Fixes: https://mattermost.atlassian.net/browse/MM-53358
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c506e01a97
Коммит
8abc8ed65c
@@ -15,42 +15,42 @@ import (
|
||||
// Feel free to add more, but do not change existing assignments. Follow the naming convention of
|
||||
// <HookName>ID as the autogenerated glue code depends on that.
|
||||
const (
|
||||
OnActivateID = 0
|
||||
OnDeactivateID = 1
|
||||
ServeHTTPID = 2
|
||||
OnConfigurationChangeID = 3
|
||||
ExecuteCommandID = 4
|
||||
MessageWillBePostedID = 5
|
||||
MessageWillBeUpdatedID = 6
|
||||
MessageHasBeenPostedID = 7
|
||||
MessageHasBeenUpdatedID = 8
|
||||
UserHasJoinedChannelID = 9
|
||||
UserHasLeftChannelID = 10
|
||||
UserHasJoinedTeamID = 11
|
||||
UserHasLeftTeamID = 12
|
||||
ChannelHasBeenCreatedID = 13
|
||||
FileWillBeUploadedID = 14
|
||||
UserWillLogInID = 15
|
||||
UserHasLoggedInID = 16
|
||||
UserHasBeenCreatedID = 17
|
||||
ReactionHasBeenAddedID = 18
|
||||
ReactionHasBeenRemovedID = 19
|
||||
OnPluginClusterEventID = 20
|
||||
OnWebSocketConnectID = 21
|
||||
OnWebSocketDisconnectID = 22
|
||||
WebSocketMessageHasBeenPostedID = 23
|
||||
RunDataRetentionID = 24
|
||||
OnInstallID = 25
|
||||
OnSendDailyTelemetryID = 26
|
||||
OnCloudLimitsUpdatedID = 27
|
||||
UserHasPermissionToCollectionID = 28
|
||||
GetAllUserIdsForCollectionID = 29
|
||||
GetAllCollectionIDsForUserID = 30
|
||||
GetTopicRedirectID = 31
|
||||
GetCollectionMetadataByIdsID = 32
|
||||
GetTopicMetadataByIdsID = 33
|
||||
ConfigurationWillBeSavedID = 34
|
||||
TotalHooksID = iota
|
||||
OnActivateID = 0
|
||||
OnDeactivateID = 1
|
||||
ServeHTTPID = 2
|
||||
OnConfigurationChangeID = 3
|
||||
ExecuteCommandID = 4
|
||||
MessageWillBePostedID = 5
|
||||
MessageWillBeUpdatedID = 6
|
||||
MessageHasBeenPostedID = 7
|
||||
MessageHasBeenUpdatedID = 8
|
||||
UserHasJoinedChannelID = 9
|
||||
UserHasLeftChannelID = 10
|
||||
UserHasJoinedTeamID = 11
|
||||
UserHasLeftTeamID = 12
|
||||
ChannelHasBeenCreatedID = 13
|
||||
FileWillBeUploadedID = 14
|
||||
UserWillLogInID = 15
|
||||
UserHasLoggedInID = 16
|
||||
UserHasBeenCreatedID = 17
|
||||
ReactionHasBeenAddedID = 18
|
||||
ReactionHasBeenRemovedID = 19
|
||||
OnPluginClusterEventID = 20
|
||||
OnWebSocketConnectID = 21
|
||||
OnWebSocketDisconnectID = 22
|
||||
WebSocketMessageHasBeenPostedID = 23
|
||||
RunDataRetentionID = 24
|
||||
OnInstallID = 25
|
||||
OnSendDailyTelemetryID = 26
|
||||
OnCloudLimitsUpdatedID = 27
|
||||
deprecatedUserHasPermissionToCollectionID = 28
|
||||
deprecatedGetAllUserIdsForCollectionID = 29
|
||||
deprecatedGetAllCollectionIDsForUserID = 30
|
||||
deprecatedGetTopicRedirectID = 31
|
||||
deprecatedGetCollectionMetadataByIdsID = 32
|
||||
deprecatedGetTopicMetadataByIdsID = 33
|
||||
ConfigurationWillBeSavedID = 34
|
||||
TotalHooksID = iota
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -278,66 +278,6 @@ type Hooks interface {
|
||||
// Minimum server version: 7.0
|
||||
OnCloudLimitsUpdated(limits *model.ProductLimits)
|
||||
|
||||
// UserHasPermissionToCollection determines if the given user has access to
|
||||
// the given collection. Plugins are only expected to handle their own
|
||||
// collections, and should return an error for unknown collections.
|
||||
//
|
||||
// For Threads Everywhere, products are expected to support at least the
|
||||
// following permissions: create_post, edit_post, delete_post,
|
||||
// edit_others_posts, and delete_others_posts.
|
||||
//
|
||||
// EXPERIMENTAL: This hook is experimental and can be changed without advance notice.
|
||||
//
|
||||
// Minimum server version: 7.6
|
||||
UserHasPermissionToCollection(c *Context, userID string, collectionType, collectionId string, permission *model.Permission) (bool, error)
|
||||
|
||||
// GetAllCollectionIDsForUser returns the set of collection ids to which
|
||||
// the given user has access. Plugins are only expected to handle their
|
||||
// own collections, and should return an error unknown types.
|
||||
//
|
||||
// EXPERIMENTAL: This hook is experimental and can be changed without advance notice.
|
||||
//
|
||||
// Minimum server version: 7.6
|
||||
GetAllCollectionIDsForUser(c *Context, userID, collectionType string) ([]string, error)
|
||||
|
||||
// GetAllCollectionIDsForUser returns the set of collection ids to which
|
||||
// the given user has access. Plugins are only expected to handle their
|
||||
// own collections, and should return an error for unknown types.
|
||||
//
|
||||
// EXPERIMENTAL: This hook is experimental and can be changed without advance notice.
|
||||
//
|
||||
// Minimum server version: 7.6
|
||||
GetAllUserIdsForCollection(c *Context, collectionType, collectionID string) ([]string, error)
|
||||
|
||||
// GetTopicRedirect returns a relative URL to which to redirect a user
|
||||
// following a topic permalink. Plugins are only expected to handle their
|
||||
// own topic types, and should return an empty string and error for unknown // types.
|
||||
//
|
||||
// EXPERIMENTAL: This hook is experimental and can be changed without advance notice.
|
||||
//
|
||||
// Minimum server version: 7.6
|
||||
GetTopicRedirect(c *Context, topicType, topicID string) (string, error)
|
||||
|
||||
// GetCollectionMetadataByIds returns collection metadata for the passed ids.
|
||||
// Returned type is a map with keys of collectionId and value CollectionMetadata.
|
||||
// Plugins are only expected to handle their own collections, and should
|
||||
// return an error for unknown types.
|
||||
//
|
||||
// EXPERIMENTAL: This hook is experimental and can be changed without advance notice.
|
||||
//
|
||||
// Minimum server version: 7.6
|
||||
GetCollectionMetadataByIds(c *Context, collectionType string, collectionIds []string) (map[string]*model.CollectionMetadata, error)
|
||||
|
||||
// GetTopicMetadataByIds returns topic metadata for the passed ids.
|
||||
// Returned type is a map with keys of topicId and value CollectionMetadata.
|
||||
// Plugins are only expected to handle their own topics, and should
|
||||
// return an error for unknown types.
|
||||
//
|
||||
// EXPERIMENTAL: This hook is experimental and can be changed without advance notice.
|
||||
//
|
||||
// Minimum server version: 7.6
|
||||
GetTopicMetadataByIds(c *Context, topicType string, topicIds []string) (map[string]*model.TopicMetadata, error)
|
||||
|
||||
// ConfigurationWillBeSaved is invoked before saving the configuration to the
|
||||
// backing store.
|
||||
// An error can be returned to reject the operation. Additionally, a new
|
||||
|
||||
Ссылка в новой задаче
Block a user