Skip to content

Commit

Permalink
Fixes #2607 - non-encrypted now visible to non-admins with asset access
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Sep 20, 2016
1 parent 5b0220a commit 2ab91fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions resources/views/models/custom_fields_form.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@

@else
<!-- Text field -->

@can('admin')
@if (($field->field_encrypted=='0') || (Gate::allows('admin')))
<input type="text" value="{{ Input::old($field->db_column_name(),(isset($asset) ? \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) : "")) }}" id="{{ $field->db_column_name() }}" class="form-control" name="{{ $field->db_column_name() }}" placeholder="Enter {{ strtolower($field->format) }} text">
@else
<input type="text" value="{{ strtoupper(trans('admin/custom_fields/general.encrypted')) }}" class="form-control disabled" disabled>
@endcan
@endif

@endif

Expand Down

0 comments on commit 2ab91fe

Please sign in to comment.