Skip to content

Commit f79f2ec

Browse files
Release OpenProject 12.0.3
2 parents 7f375de + 51b4fce commit f79f2ec

File tree

575 files changed

+859
-527
lines changed

Some content is hidden

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

575 files changed

+859
-527
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.4
1+
2.7.5

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
source 'https://rubygems.org'
3030

31-
ruby '~> 2.7.4'
31+
ruby '~> 2.7.5'
3232

3333
gem 'actionpack-xml_parser', '~> 2.0.0'
3434
gem 'activemodel-serializers-xml', '~> 1.0.1'

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ DEPENDENCIES
11381138
with_advisory_lock (~> 4.6.0)
11391139

11401140
RUBY VERSION
1141-
ruby 2.7.4p191
1141+
ruby 2.7.5p203
11421142

11431143
BUNDLED WITH
11441144
2.1.4

app/controllers/concerns/accounts/authentication_stages.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def init_authentication_stages(after_activation:)
8888

8989
# Remember back_url from params since we're redirecting
9090
# but don't use the referer
91-
session[:back_url] = params[:back_url]
91+
session[:back_url] ||= params[:back_url]
9292

9393
# Remember the autologin cookie decision
9494
session[:autologin_requested] = params[:autologin]

app/controllers/concerns/auth_source_sso.rb

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,27 @@ def find_current_user
1414
# Get the header-provided login value
1515
login = read_sso_login
1616

17+
if login.present?
18+
perform_header_sso login, user
19+
elsif header_optional?
20+
user
21+
else
22+
handle_sso_failure!
23+
nil
24+
end
25+
end
26+
27+
def perform_header_sso(login, user)
1728
# Log out the current user if the login does not match
1829
logged_user = match_sso_with_logged_user(login, user)
1930

2031
# Return the logged in user if matches
2132
return logged_user if logged_user.present?
2233

2334
Rails.logger.debug { "Starting header-based auth source SSO for #{header_name}='#{op_auth_header_value}'" }
24-
perform_header_sso login
35+
36+
user = find_user_from_auth_source(login) || create_user_from_auth_source(login)
37+
handle_sso_for! user, login
2538
end
2639

2740
def match_sso_with_logged_user(login, user)
@@ -34,16 +47,6 @@ def match_sso_with_logged_user(login, user)
3447
nil
3548
end
3649

37-
def perform_header_sso(login)
38-
if login
39-
user = find_user_from_auth_source(login) || create_user_from_auth_source(login)
40-
41-
handle_sso_for! user, login
42-
else
43-
handle_sso_failure!
44-
end
45-
end
46-
4750
def read_sso_login
4851
get_validated_login! op_auth_header_value
4952
end
@@ -162,7 +165,8 @@ def sso_login_failed?(user)
162165
def handle_sso_for!(user, login)
163166
if sso_login_failed?(user)
164167
handle_sso_failure!({ user: user, login: login })
165-
else # valid user
168+
else
169+
# valid user
166170
# If a user is invited, ensure it gets activated
167171
activated = user.invited?
168172
activate_user_if_invited! user
@@ -173,6 +177,8 @@ def handle_sso_for!(user, login)
173177

174178
def handle_sso_success(user, just_activated)
175179
session[:user_from_auth_header] = true
180+
# remember the back_url so we can redirect to the original request
181+
session[:back_url] = request.fullpath
176182
successful_authentication(user, reset_stages: true, just_registered: just_activated)
177183
end
178184

@@ -191,8 +197,6 @@ def perform_post_logout(prev_session, previous_user)
191197
end
192198

193199
def handle_sso_failure!(session_args = {})
194-
return if header_optional?
195-
196200
session[:auth_source_sso_failure] = session_args.merge(
197201
back_url: request.base_url + request.original_fullpath,
198202
ttl: 1

config/locales/crowdin/ar.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ ar:
464464
url: "الرابط"
465465
role:
466466
assignable: "Work packages can be assigned to users and groups in possession of this role in the respective project"
467+
permissions: "السماحيات"
467468
time_entry:
468469
activity: "النشاط"
469470
hours: "الساعات"

config/locales/crowdin/bg.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ bg:
460460
url: "URL АДРЕС"
461461
role:
462462
assignable: "Work packages can be assigned to users and groups in possession of this role in the respective project"
463+
permissions: "Права"
463464
time_entry:
464465
activity: "Активност"
465466
hours: "Часове"

config/locales/crowdin/ca.yml

Lines changed: 65 additions & 66 deletions
Large diffs are not rendered by default.

config/locales/crowdin/cs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ cs:
462462
url: "URL"
463463
role:
464464
assignable: "Pracovní balíčky mohou být přiřazeny uživatelům a skupinám, které tuto roli vlastní v příslušném projektu"
465+
permissions: "Práva"
465466
time_entry:
466467
activity: "Aktivita"
467468
hours: "Hodiny"

config/locales/crowdin/da.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ da:
458458
url: "Webadresse"
459459
role:
460460
assignable: "Work packages can be assigned to users and groups in possession of this role in the respective project"
461+
permissions: "Tilladelser"
461462
time_entry:
462463
activity: "Aktivivtet"
463464
hours: "Timer"

0 commit comments

Comments
 (0)