mirror of
https://github.com/mattermost/mattermost.git
synced 2026-08-26 21:27:40 -05:00
MM-61199: Remove channelBookmarks feature flag (#37120)
This commit is contained in:
@@ -801,7 +801,6 @@ const defaultServerConfig: AdminConfig = {
|
||||
MoveThreadsEnabled: false,
|
||||
StreamlinedMarketplace: true,
|
||||
CloudDedicatedExportUI: false,
|
||||
ChannelBookmarks: true,
|
||||
WebSocketEventScope: true,
|
||||
NotificationMonitoring: true,
|
||||
ExperimentalAuditSettingsSystemConsoleUI: true,
|
||||
|
||||
@@ -17,13 +17,11 @@ func rejectExternallyManagedBookmarkWrite(op string) *model.AppError {
|
||||
}
|
||||
|
||||
func (api *API) InitChannelBookmarks() {
|
||||
if api.srv.Config().FeatureFlags.ChannelBookmarks {
|
||||
api.BaseRoutes.ChannelBookmarks.Handle("", api.APISessionRequired(createChannelBookmark)).Methods(http.MethodPost)
|
||||
api.BaseRoutes.ChannelBookmark.Handle("", api.APISessionRequired(updateChannelBookmark)).Methods(http.MethodPatch)
|
||||
api.BaseRoutes.ChannelBookmark.Handle("/sort_order", api.APISessionRequired(updateChannelBookmarkSortOrder)).Methods(http.MethodPost)
|
||||
api.BaseRoutes.ChannelBookmark.Handle("", api.APISessionRequired(deleteChannelBookmark)).Methods(http.MethodDelete)
|
||||
api.BaseRoutes.ChannelBookmarks.Handle("", api.APISessionRequired(listChannelBookmarksForChannel)).Methods(http.MethodGet)
|
||||
}
|
||||
api.BaseRoutes.ChannelBookmarks.Handle("", api.APISessionRequired(createChannelBookmark)).Methods(http.MethodPost)
|
||||
api.BaseRoutes.ChannelBookmark.Handle("", api.APISessionRequired(updateChannelBookmark)).Methods(http.MethodPatch)
|
||||
api.BaseRoutes.ChannelBookmark.Handle("/sort_order", api.APISessionRequired(updateChannelBookmarkSortOrder)).Methods(http.MethodPost)
|
||||
api.BaseRoutes.ChannelBookmark.Handle("", api.APISessionRequired(deleteChannelBookmark)).Methods(http.MethodDelete)
|
||||
api.BaseRoutes.ChannelBookmarks.Handle("", api.APISessionRequired(listChannelBookmarksForChannel)).Methods(http.MethodGet)
|
||||
}
|
||||
|
||||
func createChannelBookmark(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
@@ -49,8 +49,6 @@ type FeatureFlags struct {
|
||||
|
||||
CloudDedicatedExportUI bool
|
||||
|
||||
ChannelBookmarks bool
|
||||
|
||||
WebSocketEventScope bool
|
||||
|
||||
NotificationMonitoring bool
|
||||
@@ -172,7 +170,6 @@ func (f *FeatureFlags) SetDefaults() {
|
||||
f.MoveThreadsEnabled = false
|
||||
f.StreamlinedMarketplace = true
|
||||
f.CloudDedicatedExportUI = false
|
||||
f.ChannelBookmarks = true
|
||||
f.WebSocketEventScope = true
|
||||
f.NotificationMonitoring = true
|
||||
f.ExperimentalAuditSettingsSystemConsoleUI = true
|
||||
|
||||
@@ -11,7 +11,7 @@ import type {GlobalState} from '@mattermost/types/store';
|
||||
import {Permissions} from 'mattermost-redux/constants';
|
||||
import {getChannelBookmarks} from 'mattermost-redux/selectors/entities/channel_bookmarks';
|
||||
import {getChannel, getMyChannelMember} from 'mattermost-redux/selectors/entities/channels';
|
||||
import {getConfig, getFeatureFlagValue, getLicense} from 'mattermost-redux/selectors/entities/general';
|
||||
import {getConfig, getLicense} from 'mattermost-redux/selectors/entities/general';
|
||||
import {haveIChannelPermission} from 'mattermost-redux/selectors/entities/roles';
|
||||
import {insertWithoutDuplicates} from 'mattermost-redux/utils/array_utils';
|
||||
import {getFileDownloadUrl} from 'mattermost-redux/utils/file_utils';
|
||||
@@ -118,12 +118,6 @@ export const useCanGetLinkPreviews = () => {
|
||||
};
|
||||
|
||||
export const getIsChannelBookmarksEnabled = (state: GlobalState) => {
|
||||
const isEnabled = getFeatureFlagValue(state, 'ChannelBookmarks') === 'true';
|
||||
|
||||
if (!isEnabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const license = getLicense(state);
|
||||
|
||||
return license?.IsLicensed === 'true';
|
||||
|
||||
Reference in New Issue
Block a user