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 @@ -7,8 +7,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, @@ -129,6 +134,11 @@ [changeThreadSettingsAction, dispatchActionPromise], ); + const threadNameInputDisabled = !threadHasPermission( + threadInfo, + threadPermissions.EDIT_THREAD_NAME, + ); + return (
@@ -139,7 +149,7 @@ value={firstLine(queuedChanges.name ?? threadInfo.name)} placeholder={threadNamePlaceholder} onChange={onChangeName} - disabled={inputDisabled} + disabled={inputDisabled || threadNameInputDisabled} ref={nameInputRef} />
diff --git a/web/modals/threads/settings/thread-settings-modal.react.js b/web/modals/threads/settings/thread-settings-modal.react.js --- a/web/modals/threads/settings/thread-settings-modal.react.js +++ b/web/modals/threads/settings/thread-settings-modal.react.js @@ -69,9 +69,13 @@ const hasPermissionForTab = React.useCallback( (thread: ThreadInfo, tab: TabType) => { if (tab === 'general') { - return threadHasPermission( - thread, - threadPermissions.EDIT_THREAD_NAME, + return ( + threadHasPermission(thread, threadPermissions.EDIT_THREAD_NAME) || + threadHasPermission(thread, threadPermissions.EDIT_THREAD_COLOR) || + threadHasPermission( + thread, + threadPermissions.EDIT_THREAD_DESCRIPTION, + ) ); } else if (tab === 'privacy') { return threadHasPermission(