Add missing locales and fix access to public pages
This commit is contained in:
@ -1,3 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class InternalUsersController < ApplicationController
|
class InternalUsersController < ApplicationController
|
||||||
include CommonBehavior
|
include CommonBehavior
|
||||||
|
|
||||||
@ -5,7 +7,7 @@ class InternalUsersController < ApplicationController
|
|||||||
before_action :require_reset_password_token, only: :reset_password
|
before_action :require_reset_password_token, only: :reset_password
|
||||||
before_action :set_user, only: MEMBER_ACTIONS
|
before_action :set_user, only: MEMBER_ACTIONS
|
||||||
skip_before_action :verify_authenticity_token, only: :activate
|
skip_before_action :verify_authenticity_token, only: :activate
|
||||||
skip_after_action :verify_authorized, only: [:activate, :forgot_password, :reset_password]
|
after_action :verify_authorized, except: %i[activate forgot_password reset_password]
|
||||||
|
|
||||||
def activate
|
def activate
|
||||||
set_up_password if request.patch? || request.put?
|
set_up_password if request.patch? || request.put?
|
||||||
@ -48,8 +50,7 @@ class InternalUsersController < ApplicationController
|
|||||||
destroy_and_respond(object: @user)
|
destroy_and_respond(object: @user)
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit; end
|
||||||
end
|
|
||||||
|
|
||||||
def forgot_password
|
def forgot_password
|
||||||
if request.get?
|
if request.get?
|
||||||
@ -119,8 +120,7 @@ class InternalUsersController < ApplicationController
|
|||||||
end
|
end
|
||||||
private :set_user
|
private :set_user
|
||||||
|
|
||||||
def show
|
def show; end
|
||||||
end
|
|
||||||
|
|
||||||
def update
|
def update
|
||||||
update_and_respond(object: @user, params: internal_user_params)
|
update_and_respond(object: @user, params: internal_user_params)
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
- if object
|
- if object
|
||||||
- current_element = object
|
- current_element = object
|
||||||
- else
|
- else
|
||||||
- root_element = link_to_if(policy(model).index?, model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))
|
- root_element = link_to_if(@current_user && policy(model).index?, model.model_name.human(count: 2), send(:"#{model.model_name.collection}_path"))
|
||||||
- if object
|
- if object
|
||||||
- current_element = link_to_if(policy(object).show?, object, send(:"#{model.model_name.singular}_path", object))
|
- current_element = link_to_if(@current_user && policy(object).show?, object, send(:"#{model.model_name.singular}_path", object))
|
||||||
- if I18n.translation_present?("shared.#{params[:action]}")
|
- if I18n.translation_present?("shared.#{params[:action]}")
|
||||||
- active_action = t("shared.#{params[:action]}")
|
- active_action = t("shared.#{params[:action]}")
|
||||||
- else
|
- else
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
h1 = "#{@exercise} (external user #{@external_user})"
|
h1 = "#{@exercise} (external user #{link_to_if(policy(@external_user).show?, @external_user.displayname, @external_user)})"
|
||||||
- current_submission = @submissions.first
|
- current_submission = @submissions.first
|
||||||
- if current_submission
|
- if current_submission
|
||||||
- initial_files = current_submission.files.to_a
|
- initial_files = current_submission.files.to_a
|
||||||
|
@ -236,6 +236,7 @@ de:
|
|||||||
dashboard:
|
dashboard:
|
||||||
show: Dashboard
|
show: Dashboard
|
||||||
sessions:
|
sessions:
|
||||||
|
new: Anmelden
|
||||||
destroy_through_lti: Code-Abgabe
|
destroy_through_lti: Code-Abgabe
|
||||||
statistics:
|
statistics:
|
||||||
show: "Statistiken"
|
show: "Statistiken"
|
||||||
@ -464,6 +465,8 @@ de:
|
|||||||
message: Diese Nachricht wird als Erklärung des aufgetretenen Fehlers angezeigt. Platzhalter werden automatisch durch Funde des regulären Ausdrucks ersetzt.
|
message: Diese Nachricht wird als Erklärung des aufgetretenen Fehlers angezeigt. Platzhalter werden automatisch durch Funde des regulären Ausdrucks ersetzt.
|
||||||
regular_expression: Dieser reguläre Ausdruck wird auf die Fehlermeldung angewendet, um relevante Bezeicher zu extrahieren.
|
regular_expression: Dieser reguläre Ausdruck wird auf die Fehlermeldung angewendet, um relevante Bezeicher zu extrahieren.
|
||||||
internal_users:
|
internal_users:
|
||||||
|
index:
|
||||||
|
forgot_password: Passwort zurücksetzen
|
||||||
activate:
|
activate:
|
||||||
headline: Registrierung abschließen
|
headline: Registrierung abschließen
|
||||||
submit: Passwort speichern
|
submit: Passwort speichern
|
||||||
|
@ -236,6 +236,7 @@ en:
|
|||||||
dashboard:
|
dashboard:
|
||||||
show: Dashboard
|
show: Dashboard
|
||||||
sessions:
|
sessions:
|
||||||
|
new: Sign In
|
||||||
destroy_through_lti: Code Submission
|
destroy_through_lti: Code Submission
|
||||||
statistics:
|
statistics:
|
||||||
show: "Statistics"
|
show: "Statistics"
|
||||||
@ -464,6 +465,8 @@ en:
|
|||||||
message: This message is used as an error explanation. Placeholders are automatically replaced by regular expression matches.
|
message: This message is used as an error explanation. Placeholders are automatically replaced by regular expression matches.
|
||||||
regular_expression: This regular expression is used to extract relevant identifiers from the error message.
|
regular_expression: This regular expression is used to extract relevant identifiers from the error message.
|
||||||
internal_users:
|
internal_users:
|
||||||
|
index:
|
||||||
|
forgot_password: Reset Password
|
||||||
activate:
|
activate:
|
||||||
headline: Complete Registration
|
headline: Complete Registration
|
||||||
submit: Set Password
|
submit: Set Password
|
||||||
|
Reference in New Issue
Block a user