Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

パブリック投稿の権限がなくてもパブリックを選択して投稿できてしまう #12224

Closed
ozelotdev opened this issue Nov 2, 2023 · 1 comment · Fixed by #12225
Labels
🐛Bug Unexpected behavior packages/frontend Client side specific issue/PR

Comments

@ozelotdev
Copy link
Contributor

💡 Summary

パブリック投稿の権限がなくても、パブリックを選択して投稿できてしまいます。

バックエンド側は自動でローカルに変更する処理が行われていますが、
フロントエンド側は何も案内がないため、ユーザが混乱するのではないかと思いました。

🥰 Expected Behavior

パブリックを選択できないようにするか、選択した状態で投稿できないようにする。

🤬 Actual Behavior

パブリックを選択した状態で投稿ができてしまう。
(ただし自動的に公開範囲はホームが設定される)

📝 Steps to Reproduce

  1. ベースロールから「パブリック投稿を許可」をいいえにする
  2. 公開範囲をパブリックの設定して投稿する

💻 Frontend Environment

* Model and OS of the device(s): Windows 10
* Browser: Firefox 120.0b4 64bit
* Server URL: http://localhost:3000
* Misskey: 2023.11.0-beta.7

🛰 Backend Environment (for server admin)

* Installation Method or Hosting Service: development environment (devcontainer)
* Misskey: 2023.11.0-beta.7
* Node: v20.5.1
* PostgreSQL: 15
* Redis: 7
* OS and Architecture: Debian GNU/Linux 11 (Docker)
@ozelotdev ozelotdev added the ⚠️bug? This might be a bug label Nov 2, 2023
@ozelotdev
Copy link
Contributor Author

ozelotdev commented Nov 2, 2023

ノート画面

<MkModal ref="modal" v-slot="{ type }" :zPriority="'high'" :src="src" @click="modal.close()" @closed="emit('closed')">
<div class="_popup" :class="{ [$style.root]: true, [$style.asDrawer]: type === 'drawer' }">
<div :class="[$style.label, $style.item]">
{{ i18n.ts.visibility }}
</div>
<button key="public" class="_button" :class="[$style.item, { [$style.active]: v === 'public' }]" data-index="1" @click="choose('public')">
<div :class="$style.icon"><i class="ti ti-world"></i></div>
<div :class="$style.body">
<span :class="$style.itemTitle">{{ i18n.ts._visibility.public }}</span>
<span :class="$style.itemDescription">{{ i18n.ts._visibility.publicDescription }}</span>
</div>
</button>
<button key="home" class="_button" :class="[$style.item, { [$style.active]: v === 'home' }]" data-index="2" @click="choose('home')">
<div :class="$style.icon"><i class="ti ti-home"></i></div>
<div :class="$style.body">
<span :class="$style.itemTitle">{{ i18n.ts._visibility.home }}</span>
<span :class="$style.itemDescription">{{ i18n.ts._visibility.homeDescription }}</span>
</div>
</button>
<button key="followers" class="_button" :class="[$style.item, { [$style.active]: v === 'followers' }]" data-index="3" @click="choose('followers')">
<div :class="$style.icon"><i class="ti ti-lock"></i></div>
<div :class="$style.body">
<span :class="$style.itemTitle">{{ i18n.ts._visibility.followers }}</span>
<span :class="$style.itemDescription">{{ i18n.ts._visibility.followersDescription }}</span>
</div>
</button>
<button key="specified" :disabled="localOnly" class="_button" :class="[$style.item, { [$style.active]: v === 'specified' }]" data-index="4" @click="choose('specified')">
<div :class="$style.icon"><i class="ti ti-mail"></i></div>
<div :class="$style.body">
<span :class="$style.itemTitle">{{ i18n.ts._visibility.specified }}</span>
<span :class="$style.itemDescription">{{ i18n.ts._visibility.specifiedDescription }}</span>
</div>
</button>
</div>
</MkModal>

設定 > デフォルトの公開範囲

<FormSection>
<div class="_gaps_m">
<MkSwitch v-model="rememberNoteVisibility" @update:modelValue="save()">{{ i18n.ts.rememberNoteVisibility }}</MkSwitch>
<MkFolder v-if="!rememberNoteVisibility">
<template #label>{{ i18n.ts.defaultNoteVisibility }}</template>
<template v-if="defaultNoteVisibility === 'public'" #suffix>{{ i18n.ts._visibility.public }}</template>
<template v-else-if="defaultNoteVisibility === 'home'" #suffix>{{ i18n.ts._visibility.home }}</template>
<template v-else-if="defaultNoteVisibility === 'followers'" #suffix>{{ i18n.ts._visibility.followers }}</template>
<template v-else-if="defaultNoteVisibility === 'specified'" #suffix>{{ i18n.ts._visibility.specified }}</template>
<div class="_gaps_m">
<MkSelect v-model="defaultNoteVisibility">
<option value="public">{{ i18n.ts._visibility.public }}</option>
<option value="home">{{ i18n.ts._visibility.home }}</option>
<option value="followers">{{ i18n.ts._visibility.followers }}</option>
<option value="specified">{{ i18n.ts._visibility.specified }}</option>
</MkSelect>
<MkSwitch v-model="defaultNoteLocalOnly">{{ i18n.ts._visibility.disableFederation }}</MkSwitch>
</div>
</MkFolder>
</div>
</FormSection>

@kakkokari-gtyih kakkokari-gtyih added 🐛Bug Unexpected behavior packages/frontend Client side specific issue/PR and removed ⚠️bug? This might be a bug labels Nov 2, 2023
syuilo added a commit that referenced this issue Nov 3, 2023
* fix(frontend): サイレンス状態で公開範囲のパブリックを選択できてしまう問題を修正 (#12224)

* docs: update changelog

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
kanarikanaru pushed a commit to kanarikanaru/misskey that referenced this issue Nov 9, 2023
…isskey-dev#12225)

* fix(frontend): サイレンス状態で公開範囲のパブリックを選択できてしまう問題を修正 (misskey-dev#12224)

* docs: update changelog

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Unexpected behavior packages/frontend Client side specific issue/PR
Projects
None yet
2 participants