mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
add profile option for edit history, visible only when edit history is disabled globally.
This commit is contained in:
parent
782773f774
commit
44dc4b4a17
@ -167,6 +167,9 @@
|
|||||||
{{preference-checkbox labelKey="user.enable_quoting" checked=enable_quoting}}
|
{{preference-checkbox labelKey="user.enable_quoting" checked=enable_quoting}}
|
||||||
{{preference-checkbox labelKey="user.dynamic_favicon" checked=dynamic_favicon}}
|
{{preference-checkbox labelKey="user.dynamic_favicon" checked=dynamic_favicon}}
|
||||||
{{preference-checkbox labelKey="user.disable_jump_reply" checked=disable_jump_reply}}
|
{{preference-checkbox labelKey="user.disable_jump_reply" checked=disable_jump_reply}}
|
||||||
|
{{#if !Discourse.SiteSettings.edit_history_available_to_public}}
|
||||||
|
{{preference-checkbox labelKey="user.edit_history_public" checked=edit_history_public}}
|
||||||
|
{{/if}}
|
||||||
{{plugin-outlet "user_custom_preferences"}}
|
{{plugin-outlet "user_custom_preferences"}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -774,6 +774,7 @@ end
|
|||||||
# registration_ip_address :inet
|
# registration_ip_address :inet
|
||||||
# last_redirected_to_top_at :datetime
|
# last_redirected_to_top_at :datetime
|
||||||
# disable_jump_reply :boolean default(FALSE), not null
|
# disable_jump_reply :boolean default(FALSE), not null
|
||||||
|
# edit_history_public :boolean default(FALSE), not null
|
||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
|
@ -77,7 +77,8 @@ class UserSerializer < BasicUserSerializer
|
|||||||
:gravatar_avatar_upload_id,
|
:gravatar_avatar_upload_id,
|
||||||
:custom_avatar_upload_id,
|
:custom_avatar_upload_id,
|
||||||
:custom_fields,
|
:custom_fields,
|
||||||
:has_title_badges
|
:has_title_badges,
|
||||||
|
:edit_history_public
|
||||||
|
|
||||||
###
|
###
|
||||||
### ATTRIBUTES
|
### ATTRIBUTES
|
||||||
|
@ -15,7 +15,8 @@ class UserUpdater
|
|||||||
:enable_quoting,
|
:enable_quoting,
|
||||||
:dynamic_favicon,
|
:dynamic_favicon,
|
||||||
:mailing_list_mode,
|
:mailing_list_mode,
|
||||||
:disable_jump_reply
|
:disable_jump_reply,
|
||||||
|
:edit_history_public
|
||||||
]
|
]
|
||||||
|
|
||||||
PROFILE_ATTR = [
|
PROFILE_ATTR = [
|
||||||
|
@ -271,6 +271,7 @@ en:
|
|||||||
notifications: "Notifications"
|
notifications: "Notifications"
|
||||||
disable_jump_reply: "Don't jump to your new post after replying"
|
disable_jump_reply: "Don't jump to your new post after replying"
|
||||||
dynamic_favicon: "Show incoming message notifications on favicon (experimental)"
|
dynamic_favicon: "Show incoming message notifications on favicon (experimental)"
|
||||||
|
edit_history_public: "Let other users view my post revisions"
|
||||||
external_links_in_new_tab: "Open all external links in a new tab"
|
external_links_in_new_tab: "Open all external links in a new tab"
|
||||||
enable_quoting: "Enable quote reply for highlighted text"
|
enable_quoting: "Enable quote reply for highlighted text"
|
||||||
change: "change"
|
change: "change"
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
class AddEditHistoryPublicToUsers < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :users, :edit_history_public, :boolean, default: false, null: false
|
||||||
|
end
|
||||||
|
end
|
@ -137,7 +137,7 @@ module PostGuardian
|
|||||||
return false unless post
|
return false unless post
|
||||||
|
|
||||||
if !post.hidden
|
if !post.hidden
|
||||||
return true if post.wiki || SiteSetting.edit_history_visible_to_public
|
return true if post.wiki || SiteSetting.edit_history_visible_to_public || post.user.edit_history_public
|
||||||
end
|
end
|
||||||
|
|
||||||
authenticated? &&
|
authenticated? &&
|
||||||
|
Loading…
Reference in New Issue
Block a user