mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 02:38:16 +08:00
FIX: Remove 'staff_only' results option for non-staff (#8565)
This commit is contained in:

committed by
GitHub

parent
e916bd7ea0
commit
44612f900e
@ -62,7 +62,7 @@ export default Controller.extend({
|
||||
closedPollResult,
|
||||
staffPollResult
|
||||
) {
|
||||
return [
|
||||
let options = [
|
||||
{
|
||||
name: I18n.t("poll.ui_builder.poll_result.always"),
|
||||
value: alwaysPollResult
|
||||
@ -74,12 +74,15 @@ export default Controller.extend({
|
||||
{
|
||||
name: I18n.t("poll.ui_builder.poll_result.closed"),
|
||||
value: closedPollResult
|
||||
},
|
||||
{
|
||||
name: I18n.t("poll.ui_builder.poll_result.staff"),
|
||||
value: staffPollResult
|
||||
}
|
||||
];
|
||||
if (this.currentUser.staff) {
|
||||
options.push({
|
||||
name: I18n.t("poll.ui_builder.poll_result.staff"),
|
||||
value: staffPollResult
|
||||
});
|
||||
}
|
||||
return options;
|
||||
},
|
||||
|
||||
@computed("pollType", "regularPollType")
|
||||
|
Reference in New Issue
Block a user