Lock down the controllers

This commit is contained in:
Martin Lensment 2014-12-19 13:45:17 +02:00
parent 3045c08b3e
commit 3b1e632ab7
36 changed files with 166 additions and 97 deletions

View file

View file

@ -33,7 +33,7 @@
- @domains.each do |x|
%tr
%td= link_to(x, admin_domain_path(x))
%td= link_to(x.registrar, root_path) if x.registrar
%td= link_to(x.registrar, admin_registrar_path(x.registrar)) if x.registrar
%td= link_to(x.owner_contact, [:admin, x.owner_contact])
%td= l(x.valid_to, format: :short)
.row

View file

@ -21,15 +21,14 @@
= f.label :identity_code
= f.text_field(:identity_code, class: 'form-control')
.col-md-6.text-left
.col-md-6
.form-group
= f.label :email
= f.text_field(:email, class: 'form-control')
.form-group
.checkbox
%label{for: 'user_admin'}
= f.check_box(:admin, class: 'js-admin')
= t('shared.admin')
= f.label :role_id
= f.select(:role_id, Role.all.map {|x| [t(x.code), x.id] }, {}, { class: 'form-control selectize' })
%hr
.row
.col-md-12.text-right

View file

@ -18,14 +18,17 @@
%th{class: 'col-xs-2'}
= sort_link(@q, 'identity_code', t('shared.identity_code'))
%th{class: 'col-xs-2'}
= sort_link(@q, 'admin', t('shared.admin'))
= sort_link(@q, 'role', t('role'))
%tbody
- @users.each do |x|
%tr
%td= link_to(x, [:admin, x])
%td= x.email
%td= x.identity_code
%td= x.admin
- if x.role
%td= t(x.role)
- else
%td
.row
.col-md-12
= paginate @users

View file

@ -39,5 +39,8 @@
%dt= t('shared.email')
%dd= @user.email
%dt= t('shared.admin')
%dd= @user.admin
%dt= t('role')
- if @user.role
%dd= t(@user.role)
- else
%dd

View file

@ -1,9 +0,0 @@
.row
.col-sm-12
%h2.text-center-xs
= "#{t('zonefile')}"
%hr
.row
.col-md-12
= preserve do
%pre= @zonefile