Skip to content

Commit

Permalink
Release OpenProject 12.5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Jul 18, 2023
2 parents 53b19ad + 2667294 commit 3c46078
Show file tree
Hide file tree
Showing 290 changed files with 2,553 additions and 1,582 deletions.
11 changes: 10 additions & 1 deletion app/controllers/account_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class AccountController < ApplicationController
before_action :apply_csp_appends, only: %i[login]
before_action :disable_api
before_action :check_auth_source_sso_failure, only: :auth_source_sso_failed
before_action :check_internal_login_enabled, only: :internal_login

layout 'no_menu'

Expand All @@ -49,13 +50,17 @@ def login

if user.logged?
redirect_after_login(user)
elsif omniauth_direct_login?
elsif request.get? && omniauth_direct_login?
direct_login(user)
elsif request.post?
authenticate_user
end
end

def internal_login
render 'account/login'
end

# Log out current user and redirect to welcome page
def logout
# Keep attributes from the session
Expand Down Expand Up @@ -527,4 +532,8 @@ def apply_csp_appends

append_content_security_policy_directives(appends)
end

def check_internal_login_enabled
render_404 unless omniauth_direct_login?
end
end
11 changes: 8 additions & 3 deletions app/controllers/projects/templated_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,15 @@ def change_templated_action(templated)

if service_call.success?
flash[:notice] = t(:notice_successful_update)
redirect_to project_settings_general_path(@project)
else
@errors = service_call.errors
render template: 'projects/settings/general'
messages = [
t('activerecord.errors.template.header', model: Project.model_name.human, count: service_call.errors.count),
service_call.message
]

flash[:error] = messages.join(". ")
end

redirect_to project_settings_general_path(@project)
end
end
5 changes: 3 additions & 2 deletions app/helpers/meta_tags_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ def initializer_meta_tag
firstWeekOfYear: locale_first_week_of_year,
firstDayOfWeek: locale_first_day_of_week,
environment: Rails.env,
edition: OpenProject::Configuration.edition
}
edition: OpenProject::Configuration.edition,
'asset-host': OpenProject::Configuration.rails_asset_host.presence
}.compact
end

##
Expand Down
6 changes: 6 additions & 0 deletions app/views/announcement_mailer/announce.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,11 @@
</tr>
<% end %>

<table>
<tr>
<%= placeholder_cell('20px', vertical: false) %>
</tr>
</table>

<%= render partial: 'mailer/notification_settings_table' %>
<% end %>
5 changes: 3 additions & 2 deletions app/views/groups/_memberships.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,11 @@ See COPYRIGHT and LICENSE files for more details.
<%= label_tag "membership_project_id", t(:description_choose_project), class: "hidden-for-sighted" %>

<% group_project_ids = @group.projects.ids %>
<% filter = group_project_ids.length > 0 ? [['id', '!', group_project_ids.map(&:to_s)]] : [] %>
<% filters = [['active', '=', ['t']]] %>
<% filters << ['id', '!', group_project_ids.map(&:to_s)] if group_project_ids.any? %>
<%= angular_component_tag 'op-project-autocompleter',
inputs: {
apiFilters: filter,
apiFilters: filters,
name: 'membership[project_id]'
},
data: {
Expand Down
6 changes: 0 additions & 6 deletions app/views/mailer/_border_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@
<%= placeholder_cell('12px', vertical: false) %>
</tr>
</table>

<table>
<tr>
<%= placeholder_cell('20px', vertical: false) %>
</tr>
</table>
18 changes: 18 additions & 0 deletions app/views/mailer/_notification_row.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,21 @@
</tr>
<% end %>
</a>

<table>
<tr>
<%= placeholder_cell('0px', vertical: false) %>
</tr>
</table>

<a style="margin-left: 12px;"
href="<%= notifications_path(work_package.id) %>"
target="_blank">
<%= I18n.t('mail.work_packages.open_in_browser') %>
</a>

<table>
<tr>
<%= placeholder_cell('20px', vertical: false) %>
</tr>
</table>
12 changes: 12 additions & 0 deletions app/workers/copy_project_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def title

def successful_status_update
payload = redirect_payload(url_helpers.project_url(target_project))
.merge(hal_links(target_project))

if errors.any?
payload[:errors] = errors
Expand All @@ -111,6 +112,17 @@ def failure_status_update
upsert_status status: :failure, message:
end

def hal_links(project)
{
_links: {
project: {
href: ::API::V3::Utilities::PathHelper::ApiV3Path.project(project.id),
title: project.name
}
}
}
end

def user
@user ||= User.find user_id
end
Expand Down
20 changes: 20 additions & 0 deletions config/initializers/rack-attack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,23 @@
[404, {}, ['Not found']]
end
end

Rack::Attack.throttled_responder = lambda do |request|
match_data = request.env['rack.attack.match_data']
now = match_data[:epoch_time]
retry_after = match_data[:period] - (now % match_data[:period])

headers = {
'RateLimit-Limit' => match_data[:limit].to_s,
'RateLimit-Remaining' => '0',
'RateLimit-Reset' => (now + (match_data[:period] - (now % match_data[:period]))).to_s
}

[429, headers, ["Your request has been throttled. Try again at #{retry_after.seconds.from_now}.\n"]]
end

Rack::Attack.throttle("limit-lost-password", limit: 3, period: 1.hour.to_i) do |req|
if req.post? && req.path.end_with?('/account/lost_password')
req.env.dig "rack.request.form_hash", "mail"
end
end
1 change: 1 addition & 0 deletions config/locales/crowdin/af.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2076,6 +2076,7 @@ af:
more_to_see:
one: 'There is 1 more work package with notifications.'
other: 'There are %{count} more work packages with notifications.'
open_in_browser: 'Open in browser'
reason:
watched: 'Watched'
assigned: 'Assigned'
Expand Down
1 change: 1 addition & 0 deletions config/locales/crowdin/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2143,6 +2143,7 @@ ar:
few: 'There are %{count} more work packages with notifications.'
many: 'There are %{count} more work packages with notifications.'
other: 'There are %{count} more work packages with notifications.'
open_in_browser: 'Open in browser'
reason:
watched: 'Watched'
assigned: 'Assigned'
Expand Down
1 change: 1 addition & 0 deletions config/locales/crowdin/az.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2076,6 +2076,7 @@ az:
more_to_see:
one: 'There is 1 more work package with notifications.'
other: 'There are %{count} more work packages with notifications.'
open_in_browser: 'Open in browser'
reason:
watched: 'Watched'
assigned: 'Assigned'
Expand Down
1 change: 1 addition & 0 deletions config/locales/crowdin/be.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2112,6 +2112,7 @@ be:
few: 'There are %{count} more work packages with notifications.'
many: 'There are %{count} more work packages with notifications.'
other: 'There are %{count} more work packages with notifications.'
open_in_browser: 'Open in browser'
reason:
watched: 'Watched'
assigned: 'Assigned'
Expand Down
1 change: 1 addition & 0 deletions config/locales/crowdin/bg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2076,6 +2076,7 @@ bg:
more_to_see:
one: 'There is 1 more work package with notifications.'
other: 'There are %{count} more work packages with notifications.'
open_in_browser: 'Open in browser'
reason:
watched: 'Watched'
assigned: 'Assigned'
Expand Down
17 changes: 9 additions & 8 deletions config/locales/crowdin/ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ca:
main-menu-border-color: "Vora del menú principal"
custom_colors: "Colors personalitzats"
customize: "Personalitza la teva instal·lació d'OpenProject amb el teu propi logotip i colors."
enterprise_notice: "Com un \"Gràcies!\" especial per la contribució financera al desenvolupament d'OpenProject, aquest petit add-on només està disponible pels subscriptors de l'edició Enterprise."
enterprise_notice: "Com un \"Gràcies!\" especial per la contribució financera al desenvolupament d'OpenProject, aquesta petita extensió només està disponible pels subscriptors de l'edició Enterprise."
enterprise_more_info: "Nota: el logotip utilitzat serà accessible públicament."
manage_colors: "Edita les opcions de selecció de colors"
instructions:
Expand All @@ -72,15 +72,15 @@ ca:
replace_token: "Substitueix el teu token de suport actual"
order: "Ordena l'edició Enterpise on-premises"
paste: "Enganxa el teu token de suport de l'edició Enterprise"
required_for_feature: "Aquest add-om només està disponible amb un token de suport de l'edició Enterprise."
required_for_feature: "Aquesta extensió només està disponible amb un token de suport de l'edició Enterprise."
enterprise_link: "Per a més informació, cliqueu aquí."
start_trial: 'Inicia la prova gratuïta'
book_now: 'Reserva ara'
get_quote: 'Obtenir un pressupost'
buttons:
upgrade: "Actualitza ara"
contact: "Contacta amb nosaltres per una demostració"
enterprise_info_html: "és un add-on de l'edició Enterprise <span class='spot-icon spot-icon_enterprise-badge'></span>."
enterprise_info_html: "és una extensió de l'edició Enterprise <span class='spot-icon spot-icon_enterprise-badge'></span>."
upgrade_info: "Si us plau, actualitza a una versió de pagament per tal d'activar i començar a utilitzar aquesta funcionalitat en el teu equip."
journal_aggregation:
explanation:
Expand Down Expand Up @@ -1295,11 +1295,11 @@ ca:
ee:
upsale:
form_configuration:
description: "Personalitza la configuració del formulari amb aquests add-ons extres:"
description: "Personalitza la configuració del formulari amb aquestes extensions addicionals:"
add_groups: "Afegir un nou atribut de grups"
rename_groups: "Reanomena els atributs de grups"
project_filters:
description_html: "Filtrar i ordenar camps personalitzats és un add-on de l'edició Enterprise."
description_html: "Filtrar i ordenar camps personalitzats és una extensió de l'edició Enterprise."
enumeration_activities: "Activitats de rastrejament del temps"
enumeration_work_package_priorities: "Prioritats dels paquets de treball"
enumeration_reported_project_statuses: "Estats de projecte notificats"
Expand Down Expand Up @@ -2072,6 +2072,7 @@ ca:
more_to_see:
one: 'Hi ha un paquet de treball més amb notificacions.'
other: 'Hi han %{count} paquets de treball més amb notificacions.'
open_in_browser: 'Obre al navegador'
reason:
watched: 'Observat'
assigned: 'Assignat'
Expand Down Expand Up @@ -2644,11 +2645,11 @@ ca:
text_custom_field_hint_activate_per_project_and_type: >
Els camps personalitzats han d'activar-se per classe de paquet de treball i per projecte.
text_wp_custom_field_html: >
L'edició Enterprise afegirà add-ons extra pels camps personalitzats de paquets de treball: <br> <ul> <li><b>Permet múltiple selecció dels camps personalitzats pels estils Llista o Usuari</b></li> </ul>
L'edició Enterprise afegirà extensions addicionals pels camps personalitzats de paquets de treball: <br> <ul> <li><b>Permet múltiple selecció dels camps personalitzats pels estils Llista o Usuari</b></li> </ul>
text_wp_status_read_only_html: >
L'edició Enterprise afegirà add-ons extra pels estats de paquets de treball: <br> <ul> <li><b>Permet marcar paquets de treball com a només lectura per a estats específics</b></li> </ul>
L'edició Enterprise afegirà extensions addicionals pels estats de paquets de treball: <br> <ul> <li><b>Permet marcar paquets de treball com a només lectura per a estats específics</b></li> </ul>
text_project_custom_field_html: >
L'edició Enterprise afegirà add-ons extra pels camps personalitzats de projectes: <br> <ul> <li><b>Afegeix camps personalitzats pels teus projectes a la teva llista de projectes per crear una vista de cartera de projectes</b></li> </ul>
L'edició Enterprise afegirà extensions addicionals pels camps personalitzats de projectes: <br> <ul> <li><b>Afegeix camps personalitzats pels teus projectes a la teva llista de projectes per crear una vista de cartera de projectes</b></li> </ul>
text_custom_logo_instructions: >
Es recomana un logo blanc amb fons transparent. Per a un millor resultat tant en pantalles retina o convencionals assegura't que la teva imatge té unes dimensions de 460px per 60px.
text_custom_favicon_instructions: >
Expand Down
1 change: 1 addition & 0 deletions config/locales/crowdin/ckb-IR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2076,6 +2076,7 @@ ckb-IR:
more_to_see:
one: 'There is 1 more work package with notifications.'
other: 'There are %{count} more work packages with notifications.'
open_in_browser: 'Open in browser'
reason:
watched: 'Watched'
assigned: 'Assigned'
Expand Down
13 changes: 7 additions & 6 deletions config/locales/crowdin/cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ cs:
non_working_day:
attributes:
date:
taken: "A non-working day already exists for %{value}."
taken: "Nepracovní den již existuje pro %{value}."
format: "%{message}"
parse_schema_filter_params_service:
attributes:
Expand All @@ -721,7 +721,7 @@ cs:
foreign_wps_reference_version: 'Work packages in non descendant projects reference versions of the project or its descendants.'
attributes:
base:
archive_permission_missing_on_subprojects: "You do not have the permissions required to archive all sub-projects. Please contact an administrator."
archive_permission_missing_on_subprojects: "Nemáte dostatečná oprávnění k archivaci všech podprojektů. Obraťte se na správce."
types:
in_use_by_work_packages: "stále používáno pracovními balíčky: %{types}"
enabled_modules:
Expand Down Expand Up @@ -2112,15 +2112,16 @@ cs:
few: 'Existuje ještě %{count} pracovních balíčků s notifikacema.'
many: 'Existuje ještě %{count} pracovních balíčků s notifikacema.'
other: 'Existuje ještě %{count} pracovních balíčků s notifikacema.'
open_in_browser: 'Open in browser'
reason:
watched: 'Sledováno'
assigned: 'Přiřazen'
responsible: 'Odpovědný'
mentioned: 'Zmíněné'
subscribed: 'vše'
prefix: 'Obdrženo z důvodu nastavení notifikací: %{reason}'
date_alert_start_date: 'Date alert'
date_alert_due_date: 'Date alert'
date_alert_start_date: 'Upozornění na datum'
date_alert_due_date: 'Upozornění na datum'
see_all: 'Zobrazit vše'
updated_at: 'Aktualizováno v %{timestamp} uživatelem %{user}'
mail_body_account_activation_request: "Nový uživatel (%{value}) byl zaregistrován. Účet čeká na Vaše schválení:"
Expand Down Expand Up @@ -3039,8 +3040,8 @@ cs:
journal_note:
changed: _**Working days** changed (%{changes})._
days:
working: "%{day} is now working"
non_working: "%{day} is now non-working"
working: "%{day} je pracovní "
non_working: "%{day} je nepracovní "
dates:
working: "%{date} is now working"
non_working: "%{date} is now non-working"
Expand Down
1 change: 1 addition & 0 deletions config/locales/crowdin/da.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2074,6 +2074,7 @@ da:
more_to_see:
one: 'There is 1 more work package with notifications.'
other: 'There are %{count} more work packages with notifications.'
open_in_browser: 'Open in browser'
reason:
watched: 'Watched'
assigned: 'Assigned'
Expand Down
5 changes: 3 additions & 2 deletions config/locales/crowdin/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ de:
no_results_title_text: Zur Zeit stehen keine Zugangs-Tokens zur Verfügung.
news:
index:
no_results_title_text: Es gibt aktuell keine Nachrichten.
no_results_title_text: Es gibt aktuell keine Neuigkeiten.
no_results_content_text: Neuigkeit hinzufügen
users:
groups:
Expand Down Expand Up @@ -1761,7 +1761,7 @@ de:
label_news_singular: "Neuigkeit"
label_news_added: "Neuigkeit hinzugefügt"
label_news_comment_added: "Kommentar einer Nachricht hinzugefügt"
label_news_latest: "Aktuellste Nachrichten"
label_news_latest: "Aktuellste Neuigkeiten"
label_news_new: "Nachricht hinzufügen"
label_news_edit: "Nachricht bearbeiten"
label_news_plural: "Neuigkeiten"
Expand Down Expand Up @@ -2071,6 +2071,7 @@ de:
more_to_see:
one: 'Es gibt ein weiteres Arbeitspaket mit Benachrichtigungen.'
other: 'Es gibt %{count} weitere Arbeitspakete mit Benachrichtigungen.'
open_in_browser: 'Im Browser öffnen'
reason:
watched: 'Beobachtet'
assigned: 'Zugewiesen'
Expand Down
1 change: 1 addition & 0 deletions config/locales/crowdin/el.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2072,6 +2072,7 @@ el:
more_to_see:
one: 'There is 1 more work package with notifications.'
other: 'There are %{count} more work packages with notifications.'
open_in_browser: 'Open in browser'
reason:
watched: 'Watched'
assigned: 'Assigned'
Expand Down
1 change: 1 addition & 0 deletions config/locales/crowdin/eo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2076,6 +2076,7 @@ eo:
more_to_see:
one: 'There is 1 more work package with notifications.'
other: 'There are %{count} more work packages with notifications.'
open_in_browser: 'Open in browser'
reason:
watched: 'Watched'
assigned: 'Assigned'
Expand Down
Loading

0 comments on commit 3c46078

Please sign in to comment.