Skip to content

Commit ca3de6b

Browse files
Release OpenProject 12.0.5
2 parents aa08130 + 5940f34 commit ca3de6b

File tree

830 files changed

+84216
-2563
lines changed

Some content is hidden

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

830 files changed

+84216
-2563
lines changed

.github/workflows/translations-core.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ gem 'actionpack-xml_parser', '~> 2.0.0'
3434
gem 'activemodel-serializers-xml', '~> 1.0.1'
3535
gem 'activerecord-import', '~> 1.2.0'
3636
gem 'activerecord-session_store', '~> 2.0.0'
37-
gem 'rails', '~> 6.1.3'
37+
gem 'rails', '~> 6.1.4'
3838
gem 'responders', '~> 3.0'
3939

4040
gem 'rdoc', '>= 2.4.2'

Gemfile.lock

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -183,59 +183,59 @@ GEM
183183
remote: https://rubygems.org/
184184
specs:
185185
Ascii85 (1.1.0)
186-
actioncable (6.1.4.1)
187-
actionpack (= 6.1.4.1)
188-
activesupport (= 6.1.4.1)
186+
actioncable (6.1.4.4)
187+
actionpack (= 6.1.4.4)
188+
activesupport (= 6.1.4.4)
189189
nio4r (~> 2.0)
190190
websocket-driver (>= 0.6.1)
191-
actionmailbox (6.1.4.1)
192-
actionpack (= 6.1.4.1)
193-
activejob (= 6.1.4.1)
194-
activerecord (= 6.1.4.1)
195-
activestorage (= 6.1.4.1)
196-
activesupport (= 6.1.4.1)
191+
actionmailbox (6.1.4.4)
192+
actionpack (= 6.1.4.4)
193+
activejob (= 6.1.4.4)
194+
activerecord (= 6.1.4.4)
195+
activestorage (= 6.1.4.4)
196+
activesupport (= 6.1.4.4)
197197
mail (>= 2.7.1)
198-
actionmailer (6.1.4.1)
199-
actionpack (= 6.1.4.1)
200-
actionview (= 6.1.4.1)
201-
activejob (= 6.1.4.1)
202-
activesupport (= 6.1.4.1)
198+
actionmailer (6.1.4.4)
199+
actionpack (= 6.1.4.4)
200+
actionview (= 6.1.4.4)
201+
activejob (= 6.1.4.4)
202+
activesupport (= 6.1.4.4)
203203
mail (~> 2.5, >= 2.5.4)
204204
rails-dom-testing (~> 2.0)
205-
actionpack (6.1.4.1)
206-
actionview (= 6.1.4.1)
207-
activesupport (= 6.1.4.1)
205+
actionpack (6.1.4.4)
206+
actionview (= 6.1.4.4)
207+
activesupport (= 6.1.4.4)
208208
rack (~> 2.0, >= 2.0.9)
209209
rack-test (>= 0.6.3)
210210
rails-dom-testing (~> 2.0)
211211
rails-html-sanitizer (~> 1.0, >= 1.2.0)
212212
actionpack-xml_parser (2.0.1)
213213
actionpack (>= 5.0)
214214
railties (>= 5.0)
215-
actiontext (6.1.4.1)
216-
actionpack (= 6.1.4.1)
217-
activerecord (= 6.1.4.1)
218-
activestorage (= 6.1.4.1)
219-
activesupport (= 6.1.4.1)
215+
actiontext (6.1.4.4)
216+
actionpack (= 6.1.4.4)
217+
activerecord (= 6.1.4.4)
218+
activestorage (= 6.1.4.4)
219+
activesupport (= 6.1.4.4)
220220
nokogiri (>= 1.8.5)
221-
actionview (6.1.4.1)
222-
activesupport (= 6.1.4.1)
221+
actionview (6.1.4.4)
222+
activesupport (= 6.1.4.4)
223223
builder (~> 3.1)
224224
erubi (~> 1.4)
225225
rails-dom-testing (~> 2.0)
226226
rails-html-sanitizer (~> 1.1, >= 1.2.0)
227-
activejob (6.1.4.1)
228-
activesupport (= 6.1.4.1)
227+
activejob (6.1.4.4)
228+
activesupport (= 6.1.4.4)
229229
globalid (>= 0.3.6)
230-
activemodel (6.1.4.1)
231-
activesupport (= 6.1.4.1)
230+
activemodel (6.1.4.4)
231+
activesupport (= 6.1.4.4)
232232
activemodel-serializers-xml (1.0.2)
233233
activemodel (> 5.x)
234234
activesupport (> 5.x)
235235
builder (~> 3.1)
236-
activerecord (6.1.4.1)
237-
activemodel (= 6.1.4.1)
238-
activesupport (= 6.1.4.1)
236+
activerecord (6.1.4.4)
237+
activemodel (= 6.1.4.4)
238+
activesupport (= 6.1.4.4)
239239
activerecord-import (1.2.0)
240240
activerecord (>= 3.2)
241241
activerecord-nulldb-adapter (0.8.0)
@@ -246,14 +246,14 @@ GEM
246246
multi_json (~> 1.11, >= 1.11.2)
247247
rack (>= 2.0.8, < 3)
248248
railties (>= 5.2.4.1)
249-
activestorage (6.1.4.1)
250-
actionpack (= 6.1.4.1)
251-
activejob (= 6.1.4.1)
252-
activerecord (= 6.1.4.1)
253-
activesupport (= 6.1.4.1)
249+
activestorage (6.1.4.4)
250+
actionpack (= 6.1.4.4)
251+
activejob (= 6.1.4.4)
252+
activerecord (= 6.1.4.4)
253+
activesupport (= 6.1.4.4)
254254
marcel (~> 1.0.0)
255255
mini_mime (>= 1.1.0)
256-
activesupport (6.1.4.1)
256+
activesupport (6.1.4.4)
257257
concurrent-ruby (~> 1.0, >= 1.0.2)
258258
i18n (>= 1.6, < 2)
259259
minitest (>= 5.1)
@@ -513,7 +513,7 @@ GEM
513513
ruby-progressbar (~> 1.4)
514514
git (1.9.1)
515515
rchardet (~> 1.8)
516-
globalid (0.5.2)
516+
globalid (1.0.0)
517517
activesupport (>= 5.0)
518518
gon (6.4.0)
519519
actionpack (>= 3.0.20)
@@ -596,7 +596,7 @@ GEM
596596
activesupport (>= 4)
597597
railties (>= 4)
598598
request_store (~> 1.0)
599-
loofah (2.12.0)
599+
loofah (2.13.0)
600600
crass (~> 1.0.2)
601601
nokogiri (>= 1.5.9)
602602
mail (2.7.1)
@@ -614,7 +614,7 @@ GEM
614614
mini_mime (1.1.2)
615615
mini_portile2 (2.6.1)
616616
minisyntax (0.2.5)
617-
minitest (5.14.4)
617+
minitest (5.15.0)
618618
mixlib-shellout (2.1.0)
619619
msgpack (1.4.2)
620620
multi_json (1.15.0)
@@ -733,20 +733,20 @@ GEM
733733
rack_session_access (0.2.0)
734734
builder (>= 2.0.0)
735735
rack (>= 1.0.0)
736-
rails (6.1.4.1)
737-
actioncable (= 6.1.4.1)
738-
actionmailbox (= 6.1.4.1)
739-
actionmailer (= 6.1.4.1)
740-
actionpack (= 6.1.4.1)
741-
actiontext (= 6.1.4.1)
742-
actionview (= 6.1.4.1)
743-
activejob (= 6.1.4.1)
744-
activemodel (= 6.1.4.1)
745-
activerecord (= 6.1.4.1)
746-
activestorage (= 6.1.4.1)
747-
activesupport (= 6.1.4.1)
736+
rails (6.1.4.4)
737+
actioncable (= 6.1.4.4)
738+
actionmailbox (= 6.1.4.4)
739+
actionmailer (= 6.1.4.4)
740+
actionpack (= 6.1.4.4)
741+
actiontext (= 6.1.4.4)
742+
actionview (= 6.1.4.4)
743+
activejob (= 6.1.4.4)
744+
activemodel (= 6.1.4.4)
745+
activerecord (= 6.1.4.4)
746+
activestorage (= 6.1.4.4)
747+
activesupport (= 6.1.4.4)
748748
bundler (>= 1.15.0)
749-
railties (= 6.1.4.1)
749+
railties (= 6.1.4.4)
750750
sprockets-rails (>= 2.0.0)
751751
rails-controller-testing (1.0.5)
752752
actionpack (>= 5.0.1.rc1)
@@ -760,9 +760,9 @@ GEM
760760
rails-i18n (6.0.0)
761761
i18n (>= 0.7, < 2)
762762
railties (>= 6.0.0, < 7)
763-
railties (6.1.4.1)
764-
actionpack (= 6.1.4.1)
765-
activesupport (= 6.1.4.1)
763+
railties (6.1.4.4)
764+
actionpack (= 6.1.4.4)
765+
activesupport (= 6.1.4.4)
766766
method_source
767767
rake (>= 0.13)
768768
thor (~> 1.0)
@@ -899,9 +899,9 @@ GEM
899899
sprockets (3.7.2)
900900
concurrent-ruby (~> 1.0)
901901
rack (> 1, < 3)
902-
sprockets-rails (3.2.2)
903-
actionpack (>= 4.0)
904-
activesupport (>= 4.0)
902+
sprockets-rails (3.4.2)
903+
actionpack (>= 5.2)
904+
activesupport (>= 5.2)
905905
sprockets (>= 3.0.0)
906906
ssrf_filter (1.0.7)
907907
stackprof (0.2.17)
@@ -1086,7 +1086,7 @@ DEPENDENCIES
10861086
rack-test (~> 1.1.0)
10871087
rack-timeout (~> 0.6.0)
10881088
rack_session_access
1089-
rails (~> 6.1.3)
1089+
rails (~> 6.1.4)
10901090
rails-controller-testing (~> 1.0.2)
10911091
rails-i18n (~> 6.0.0)
10921092
rdoc (>= 2.4.2)

app/contracts/users/create_contract.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,16 @@ class CreateContract < BaseContract
4242
validate :user_allowed_to_add
4343
validate :authentication_defined
4444
validate :type_is_user
45+
validate :user_limit_not_exceeded
4546

4647
private
4748

49+
def user_limit_not_exceeded
50+
if OpenProject::Enterprise.user_limit_reached?
51+
errors.add :base, :user_limit_reached
52+
end
53+
end
54+
4855
def authentication_defined
4956
errors.add :password, :blank if model.active? && no_auth?
5057
end

app/contracts/work_packages/base_contract.rb

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,18 @@ def validate_people_visible(attribute, id_attribute, list)
304304
end
305305
end
306306

307+
def readonly_attributes_unchanged
308+
super.tap do
309+
if already_in_readonly_status? && unauthenticated_changed.any?
310+
# Better documentation on why a property is readonly.
311+
errors.add :base, :readonly_status
312+
end
313+
end
314+
end
315+
307316
def reduce_by_writable_permissions(attributes)
308-
# If we're in a readonly status and did not move into that status right now
309-
# only allow other status transitions. But also prevent that if the associated version is closed.
310-
if model.readonly_status? && !model.status_id_change
317+
# If we're in a readonly status only allow other status transitions.
318+
if already_in_readonly_status?
311319
super & %w(status status_id)
312320
else
313321
super
@@ -420,5 +428,10 @@ def user_is_author?
420428
def users_roles_in_project
421429
user.roles_for_project(model.project)
422430
end
431+
432+
# We're in a readonly status and did not move into that status right now.
433+
def already_in_readonly_status?
434+
model.readonly_status? && !model.status_id_change
435+
end
423436
end
424437
end

app/controllers/account_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ def change_password
269269

270270
def auth_source_sso_failed
271271
failure = session.delete :auth_source_sso_failure
272-
user = failure[:user]
272+
login = failure[:login]
273+
user = find_or_create_sso_user(login, save: false)
273274

274275
if user.try(:new_record?)
275276
return onthefly_creation_failed user, login: user.login, auth_source_id: user.auth_source_id

0 commit comments

Comments
 (0)