diff options
| author | jpl | 2017-04-04 13:46:11 +0200 | 
|---|---|---|
| committer | jpl | 2017-04-04 13:46:53 +0200 | 
| commit | 3ee2b65fb1171c4c401ee26ba1d0b485548c28f8 (patch) | |
| tree | 807fe25dd6579bc1fc9a9586a2b9b75e5ee9e270 | |
| parent | 055fa0b56c0a47482f098af079b5e0929be56acd (diff) | |
| download | chouette-core-3ee2b65fb1171c4c401ee26ba1d0b485548c28f8.tar.bz2 | |
Refs #3033: adding 403 view
| -rw-r--r-- | app/views/errors/not_allowed.html.slim | 21 | ||||
| -rw-r--r-- | config/routes.rb | 7 | 
2 files changed, 25 insertions, 3 deletions
| diff --git a/app/views/errors/not_allowed.html.slim b/app/views/errors/not_allowed.html.slim new file mode 100644 index 000000000..6c94328cc --- /dev/null +++ b/app/views/errors/not_allowed.html.slim @@ -0,0 +1,21 @@ +/ PageHeader += pageheader 'bug', +             'Erreur 403', +             '' + +.page_content +  .container-fluid +    .row +      .col-lg-12 +        .alert.alert-danger +          - if I18n.locale == :fr +            p +              strong = "Désolé, la page demandée la page n'est pas accessible avec votre profil utilisateur." +             +            p = "Vous pouvez néanmoins continuer à utiliser l'application IBOO." +               +          - else +            p +              strong = "You are not allowed to access the page you were looking for." +             +            p = "You can still continue the use the IBOO application. Thank you for understanding." diff --git a/config/routes.rb b/config/routes.rb index 33f3961b1..12dbf0986 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -211,8 +211,9 @@ ChouetteIhm::Application.routes.draw do    get '/help/(*slug)' => 'help#show' -  get '/404', :to => 'errors#not_found' -  get '/422', :to => 'errors#server_error' -  get '/500', :to => 'errors#server_error' +  get '/404', to: 'errors#not_found' +  get '/403', to: 'errors#not_allowed' +  get '/422', to: 'errors#server_error' +  get '/500', to: 'errors#server_error'  end | 
