diff --git a/web/modals/threads/settings/thread-settings-general-tab.react.js b/web/modals/threads/settings/thread-settings-general-tab.react.js --- a/web/modals/threads/settings/thread-settings-general-tab.react.js +++ b/web/modals/threads/settings/thread-settings-general-tab.react.js @@ -6,8 +6,13 @@ changeThreadSettingsActionTypes, changeThreadSettings, } from 'lib/actions/thread-actions'; +import { threadHasPermission } from 'lib/shared/thread-utils'; import { type SetState } from 'lib/types/hook-types'; -import { type ThreadInfo, type ThreadChanges } from 'lib/types/thread-types'; +import { + type ThreadInfo, + type ThreadChanges, + threadPermissions, +} from 'lib/types/thread-types'; import { useDispatchActionPromise, useServerCall, @@ -128,6 +133,11 @@ [changeThreadSettingsAction, dispatchActionPromise], ); + const threadNameInputDisabled = React.useMemo( + () => !threadHasPermission(threadInfo, threadPermissions.EDIT_THREAD_NAME), + [threadInfo], + ); + return (