Skip to content

Commit 5be82c4

Browse files
Release OpenProject 11.3.5
2 parents 6f1e231 + a952067 commit 5be82c4

File tree

86 files changed

+944
-596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+944
-596
lines changed

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
# This is used to prevent people from using the new docker-compose file for automated installs
3434
LOCAL_DEV_CHECK=1
3535

36+
# Set this to your ckeditor build output directory (which includes ckeditor.js) if you
37+
# want to develop ckeditor locally.
38+
CKEDITOR_BUILD_DIR=frontend/src/vendor/ckeditor/
39+
3640
# This is the host from which you will be accessing the development servers locally
3741
PUBLIC_HOST=localhost
3842

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ gem 'semantic', '~> 1.6.1'
9696
gem 'svg-graph', '~> 2.2.0'
9797

9898
gem 'date_validator', '~> 0.11.0'
99+
gem 'email_validator', '~> 2.2.3'
99100
gem 'ruby-duration', '~> 3.2.0'
100101

101102
# provide compatible filesystem information for available storage

Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,8 @@ GEM
439439
eventmachine (>= 1.0.0.beta.4)
440440
em-synchrony (1.0.6)
441441
eventmachine (>= 1.0.0.beta.1)
442+
email_validator (2.2.3)
443+
activemodel
442444
equivalent-xml (0.6.0)
443445
nokogiri (>= 1.4.3)
444446
erbse (0.1.4)
@@ -989,6 +991,7 @@ DEPENDENCIES
989991
delayed_job_active_record (~> 4.1.5)
990992
disposable (~> 0.4.7)
991993
doorkeeper (~> 5.5.0)
994+
email_validator (~> 2.2.3)
992995
equivalent-xml (~> 0.6)
993996
escape_utils (~> 1.0)
994997
factory_bot (~> 6.2.0)

app/helpers/enterprise_trial_helper.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ def augur_content_security_policy
66
end
77

88
def chargebee_content_security_policy
9+
script_src = %w(js.chargebee.com)
10+
default_src = script_src + ["#{OpenProject::Configuration.enterprise_chargebee_site}.chargebee.com"]
11+
912
append_content_security_policy_directives(
10-
script_src: %w(js.chargebee.com),
11-
style_src: %w(js.chargebee.com openproject-enterprise-test.chargebee.com),
12-
frame_src: %w(js.chargebee.com openproject-enterprise-test.chargebee.com)
13+
script_src: script_src,
14+
style_src: default_src,
15+
frame_src: default_src
1316
)
1417
end
1518

app/models/setting.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,21 @@ def self.cached_settings
285285
end
286286

287287
def self.cache_key
288-
RequestStore.store[:settings_updated_at] ||= Setting.column_names.include?(:updated_at) && Setting.maximum(:updated_at)
289-
most_recent_settings_change = (RequestStore.store[:settings_updated_at] || Time.now.utc).to_i
288+
most_recent_settings_change = (settings_updated_at || Time.now.utc).to_i
289+
290290
"/openproject/settings/all/#{most_recent_settings_change}"
291291
end
292292

293+
def self.settings_updated_at
294+
RequestStore.store[:settings_updated_at] ||= has_updated_at_column? && Setting.maximum(:updated_at)
295+
end
296+
297+
def self.has_updated_at_column?
298+
return @has_updated_at_column unless @has_updated_at_column.nil?
299+
300+
@has_updated_at_column = Setting.column_names.map(&:to_sym).include?(:updated_at)
301+
end
302+
293303
def self.settings_table_exists_yet?
294304
# Check whether the settings table already exists. This makes plugins
295305
# patching core classes not break things when settings are accessed.

app/models/user.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,15 @@ def self.blocked_condition(blocked)
112112
:firstname,
113113
:lastname,
114114
:mail,
115-
unless: Proc.new { |user| user.is_a?(AnonymousUser) || user.is_a?(DeletedUser) || user.is_a?(SystemUser) }
115+
unless: Proc.new { |user| user.builtin? }
116116

117117
validates_uniqueness_of :login, if: Proc.new { |user| !user.login.blank? }, case_sensitive: false
118118
validates_uniqueness_of :mail, allow_blank: true, case_sensitive: false
119119
# Login must contain letters, numbers, underscores only
120120
validates_format_of :login, with: /\A[a-z0-9_\-@.+ ]*\z/i
121121
validates_length_of :login, maximum: 256
122122
validates_length_of :firstname, :lastname, maximum: 256
123-
validates_format_of :mail, with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, allow_blank: true
123+
validates :mail, email: true, unless: Proc.new { |user| user.mail.blank? }
124124
validates_length_of :mail, maximum: 256, allow_nil: true
125125
validates_confirmation_of :password, allow_nil: true
126126
validates_inclusion_of :mail_notification, in: MAIL_NOTIFICATION_OPTIONS.map(&:first), allow_blank: true

app/views/admin/info.html.erb

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,28 @@ See docs/COPYRIGHT.rdoc for more details.
5454
<span><%= @db_version %></span>
5555
</div>
5656
</div>
57+
<% if OpenProject::Database.version_deprecated? %>
58+
<div class="attributes-key-value--key"></div>
59+
<div class="attributes-key-value--value-container">
60+
<div class="attributes-key-value--value -text">
61+
<strong>
62+
<%= op_icon 'icon3 icon-warning' %>
63+
Deprecation warning:
64+
</strong>
65+
<p>
66+
The next major release of OpenProject will update the requirements
67+
on the required PostgreSQL database version.
68+
<br/>
69+
Starting with OpenProject 12.0, anticipated end of 2021, PostgreSQL 13 will be required
70+
to use OpenProject.
71+
<br/>
72+
We have prepared <%= static_link_to :postgres_13_upgrade,
73+
label: 'upgrade guides for all installation methods' %>.
74+
You can perform the upgrade ahead of the release at any time by following the guides.
75+
</p>
76+
</div>
77+
</div>
78+
<% end %>
5779
<% if display_security_badge_graphic? %>
5880
<div class="attributes-key-value--key"></div>
5981
<div class="attributes-key-value--value-container">
@@ -95,38 +117,38 @@ See docs/COPYRIGHT.rdoc for more details.
95117
</div>
96118
</div>
97119

98-
<% @storage_information.each_with_index do |(_,entries), i| %>
99-
<%= content_tag :h3, t(:label_storage_group, identifier: i + 1) %>
100-
<div class="attributes-group">
101-
<div class="attributes-key-value">
102-
<div class="attributes-key-value--key"><%= t(:label_storage_for) %></div>
103-
<div class="attributes-key-value--value-container">
104-
<div class="attributes-key-value--value -text">
120+
<% @storage_information.each_with_index do |(_, entries), i| %>
121+
<%= content_tag :h3, t(:label_storage_group, identifier: i + 1) %>
122+
<div class="attributes-group">
123+
<div class="attributes-key-value">
124+
<div class="attributes-key-value--key"><%= t(:label_storage_for) %></div>
125+
<div class="attributes-key-value--value-container">
126+
<div class="attributes-key-value--value -text">
105127
<span>
106128
<% entries[:labels].each do |l| %>
107129
<%= l %>
108130
<br/>
109131
<% end %>
110132
</span>
133+
</div>
111134
</div>
112-
</div>
113-
<div class="attributes-key-value--key"><%= t(:label_storage_free_space) %></div>
114-
<div class="attributes-key-value--value-container">
115-
<div class="attributes-key-value--value -text">
116-
<span><%= number_to_human_size(entries[:data][:free], precision: 2) %></span>
135+
<div class="attributes-key-value--key"><%= t(:label_storage_free_space) %></div>
136+
<div class="attributes-key-value--value-container">
137+
<div class="attributes-key-value--value -text">
138+
<span><%= number_to_human_size(entries[:data][:free], precision: 2) %></span>
139+
</div>
117140
</div>
118-
</div>
119-
<div class="attributes-key-value--key"><%= t(:label_storage_used_space) %></div>
120-
<div class="attributes-key-value--value-container">
121-
<div class="attributes-key-value--value -text">
141+
<div class="attributes-key-value--key"><%= t(:label_storage_used_space) %></div>
142+
<div class="attributes-key-value--value-container">
143+
<div class="attributes-key-value--value -text">
122144
<span>
123145
<%= number_to_human_size(entries[:data][:used], precision: 2) %>
124146
(<%= entries[:data][:percent_used].round(2) %> %)
125147
</span>
148+
</div>
126149
</div>
127150
</div>
128151
</div>
129-
</div>
130152
<% end %>
131153

132154
<%= call_hook(:view_admin_info_bottom) %>

app/views/enterprises/_info.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ See docs/COPYRIGHT.rdoc for more details.
2828
++#%>
2929
<% content_for :header_tags do %>
3030
<script src="<%= OpenProject::Static::Links.links[:chargebee][:href] %>"
31-
data-cb-site="openproject-enterprise-test">
31+
data-cb-site="<%= OpenProject::Configuration.enterprise_chargebee_site %>">
3232
</script>
3333
<% end %>
3434

@@ -41,7 +41,7 @@ See docs/COPYRIGHT.rdoc for more details.
4141
<a href="#"
4242
class="button -highlight-inverted"
4343
data-cb-type="checkout"
44-
data-cb-plan-id="enterprise-edition---annual-user-license">
44+
data-cb-plan-id="<%= OpenProject::Configuration.enterprise_plan %>">
4545
<%= t('admin.enterprise.book_now') %>
4646
</a>
4747

app/workers/application_job.rb

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ class ApplicationJob < ::ActiveJob::Base
3636
# to avoid leaking sensitive information to logs
3737
self.log_arguments = false
3838

39-
around_perform do |_job, block|
40-
reload_mailer_configuration!
41-
with_clean_request_store { block.call }
42-
end
39+
around_perform :clean_context
4340

4441
##
4542
# Return a priority number on the given payload
@@ -90,4 +87,14 @@ def with_clean_request_store
9087
def reload_mailer_configuration!
9188
OpenProject::Configuration.reload_mailer_configuration!
9289
end
90+
91+
private
92+
93+
def clean_context
94+
with_clean_request_store do
95+
reload_mailer_configuration!
96+
97+
yield
98+
end
99+
end
93100
end

config/locales/crowdin/ar.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ ar:
546546
error_enterprise_only: "is only available in the OpenProject Enterprise Edition"
547547
error_unauthorized: "may not be accessed."
548548
error_readonly: "was attempted to be written but is not writable."
549+
email: "is not a valid email address."
549550
empty: "لا يمكن أن تكون فارغة."
550551
even: "يجب أن يكون زوجي."
551552
exclusion: "محجوز."

0 commit comments

Comments
 (0)