mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Default to keeping user's email addresses private.
This commit is contained in:
parent
d61b4253df
commit
ed6b2d8c93
7 changed files with 31 additions and 17 deletions
|
|
@ -70,6 +70,7 @@
|
||||||
%b Submitter
|
%b Submitter
|
||||||
%td
|
%td
|
||||||
= link_to @event.submitter.name, admin_user_path(@event.submitter)
|
= link_to @event.submitter.name, admin_user_path(@event.submitter)
|
||||||
|
- if @event.submitter.email_public
|
||||||
(
|
(
|
||||||
= link_to @event.submitter.email, "mailto: #{@event.submitter.email}"
|
= link_to @event.submitter.email, "mailto: #{@event.submitter.email}"
|
||||||
)
|
)
|
||||||
|
|
@ -80,6 +81,7 @@
|
||||||
- @event.speakers.each do |speaker|
|
- @event.speakers.each do |speaker|
|
||||||
%div
|
%div
|
||||||
= link_to speaker.name, admin_user_path(speaker)
|
= link_to speaker.name, admin_user_path(speaker)
|
||||||
|
- if speaker.email_public
|
||||||
(
|
(
|
||||||
= link_to speaker.email, "mailto: #{speaker.email}"
|
= link_to speaker.email, "mailto: #{speaker.email}"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@
|
||||||
- @booth.responsibles.each_with_index do |responsibles, i|
|
- @booth.responsibles.each_with_index do |responsibles, i|
|
||||||
.responsibles
|
.responsibles
|
||||||
= link_to responsibles.name, user_path(responsibles)
|
= link_to responsibles.name, user_path(responsibles)
|
||||||
|
- if responsibles.email_public
|
||||||
(
|
(
|
||||||
= responsibles.email
|
= responsibles.email
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@
|
||||||
= semantic_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
|
= semantic_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f|
|
||||||
= f.input :username, required: false, input_html: { autocomplete: 'off' }
|
= f.input :username, required: false, input_html: { autocomplete: 'off' }
|
||||||
= f.input :email, required: false, input_html: { autocomplete: 'off' }
|
= f.input :email, required: false, input_html: { autocomplete: 'off' }
|
||||||
= f.input :email_public
|
= f.input :email_public,
|
||||||
|
hint: "Do you want to your email address publicly? (On sessions, registration lists, etc.)"
|
||||||
= f.input :password, hint: "(Leave blank if you don't want to change it)", input_html: { autocomplete: 'off' }
|
= f.input :password, hint: "(Leave blank if you don't want to change it)", input_html: { autocomplete: 'off' }
|
||||||
= f.input :password_confirmation, input_html: { autocomplete: 'off' }
|
= f.input :password_confirmation, input_html: { autocomplete: 'off' }
|
||||||
= f.inputs name: 'OpenID' do
|
= f.inputs name: 'OpenID' do
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,7 @@
|
||||||
%ul.nav.navbar-nav.navbar-right
|
%ul.nav.navbar-nav.navbar-right
|
||||||
%li.dropdown
|
%li.dropdown
|
||||||
%a.dropdown-toggle{"data-toggle" => "dropdown", href: '#', id: "current-user-detail"}
|
%a.dropdown-toggle{"data-toggle" => "dropdown", href: '#', id: "current-user-detail"}
|
||||||
- if not current_user.name.blank?
|
= current_user.name
|
||||||
#{current_user.name}
|
|
||||||
-else
|
|
||||||
#{current_user.email}
|
|
||||||
= image_tag(current_user.gravatar_url(size: '18'), title: "Yo #{current_user.name}!", alt: '')
|
= image_tag(current_user.gravatar_url(size: '18'), title: "Yo #{current_user.name}!", alt: '')
|
||||||
%b.caret
|
%b.caret
|
||||||
%ul.dropdown-menu
|
%ul.dropdown-menu
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,11 @@
|
||||||
%tr
|
%tr
|
||||||
%td= index
|
%td= index
|
||||||
%td= event_registration.name
|
%td= event_registration.name
|
||||||
%td= event_registration.email
|
%td
|
||||||
|
- if event_registration.registration.user.email_public
|
||||||
|
= event_registration.email
|
||||||
|
- else
|
||||||
|
(private)
|
||||||
%td= event_registration.created_at
|
%td= event_registration.created_at
|
||||||
%td.text-center
|
%td.text-center
|
||||||
- if event_registration.attended
|
- if event_registration.attended
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
class UserEmailPublicDefaultsToFalse < ActiveRecord::Migration[5.0]
|
||||||
|
def up
|
||||||
|
change_column_default :users, :email_public, false
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
change_column_default :users, :email_public, true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20180822125509) do
|
ActiveRecord::Schema.define(version: 20180924221715) do
|
||||||
|
|
||||||
create_table "ahoy_events", force: :cascade do |t|
|
create_table "ahoy_events", force: :cascade do |t|
|
||||||
t.integer "visit_id"
|
t.integer "visit_id"
|
||||||
|
|
@ -603,7 +603,7 @@ ActiveRecord::Schema.define(version: 20180822125509) do
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.boolean "email_public", default: true
|
t.boolean "email_public", default: false
|
||||||
t.text "biography"
|
t.text "biography"
|
||||||
t.string "nickname"
|
t.string "nickname"
|
||||||
t.string "affiliation"
|
t.string "affiliation"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue