diff options
Diffstat (limited to 'app/helpers/routing/pseudonymization_helper.rb')
-rw-r--r-- | app/helpers/routing/pseudonymization_helper.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/helpers/routing/pseudonymization_helper.rb b/app/helpers/routing/pseudonymization_helper.rb index eb4e5d1c01c..dce0517690d 100644 --- a/app/helpers/routing/pseudonymization_helper.rb +++ b/app/helpers/routing/pseudonymization_helper.rb @@ -43,11 +43,12 @@ module Routing private def mask_id(value) - if @request.path_parameters[:controller] == 'projects/blob' + case @request.path_parameters[:controller] + when 'projects/blob' ':repository_path' - elsif @request.path_parameters[:controller] == 'projects' + when 'projects' "project#{@project&.id}" - elsif @request.path_parameters[:controller] == 'groups' + when 'groups' "namespace#{@group&.id}" else value |