Skip to content

Commit

Permalink
Adding admin account to staging
Browse files Browse the repository at this point in the history
  • Loading branch information
Un3x committed Jan 23, 2025
1 parent 212098e commit 64fdf9b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions app/controllers/admin/editors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ def update
private

def editor_update_params
params.require(:editor).permit(
:name,
:form_uids,
:copy_token
params.expect(
editor: %i[name
form_uids
copy_token]
).tap do |whitelisted|
whitelisted[:form_uids] = (whitelisted[:form_uids] || '').split(',').map(&:strip)
end
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ def stop_impersonating
private

def user_params
params.require(:user).permit(:editor_id)
params.expect(user: [:editor_id])
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ def find_prolong_token_wizard
end

def prolong_token_wizard_params
params.require(:prolong_token_wizard).permit(:owner, :project_purpose, :contact_metier, :contact_technique)
params.expect(prolong_token_wizard: %i[owner project_purpose contact_metier contact_technique])
end
end
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def editor?
def admin?
if Rails.env.production?
Rails.application.credentials.admin_emails.include?(email)
elsif Rails.env.development?
elsif Rails.env.development? || Rails.env.staging?
%w[
[email protected]
[email protected]
Expand Down

0 comments on commit 64fdf9b

Please sign in to comment.