Skip to content

Commit 8b9c7e9

Browse files
committed
ensure we can create user with password hack
1 parent 002dc75 commit 8b9c7e9

File tree

1 file changed

+31
-13
lines changed

1 file changed

+31
-13
lines changed

resources/views/users/form.blade.php

+31-13
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,39 @@
6161
<div class="col-sm-12">
6262
<hr>
6363
</div>
64-
@if(isset($user) && auth()->user()->canChangePasswordOn($user))
65-
<div class="col-sm-3">
66-
<label for="name" class="base-input-label">@lang('Security')</label>
67-
</div>
6864

69-
<div class="col-sm-9">
70-
<div class="form-group col-sm-8">
71-
<label for="password" class="control-label thin-weight">@lang('Password')</label>
72-
<input type="password" name="password" class="form-control" value="">
65+
@if(isset($user))
66+
@if(auth()->user()->canChangePasswordOn($user))
67+
<div class="col-sm-3">
68+
<label for="name" class="base-input-label">@lang('Security')</label>
7369
</div>
74-
<div class="form-group col-sm-8">
75-
<label for="password_confirmation" class="control-label thin-weight">@lang('Confirm password')</label>
76-
<input type="password" name="password_confirmation" class="form-control" value="">
70+
71+
<div class="col-sm-9">
72+
<div class="form-group col-sm-8">
73+
<label for="password" class="control-label thin-weight">@lang('Password')</label>
74+
<input type="password" name="password" class="form-control" value="">
75+
</div>
76+
<div class="form-group col-sm-8">
77+
<label for="password_confirmation" class="control-label thin-weight">@lang('Confirm password')</label>
78+
<input type="password" name="password_confirmation" class="form-control" value="">
79+
</div>
80+
</div>
81+
@endif
82+
@else
83+
<div class="col-sm-3">
84+
<label for="name" class="base-input-label">@lang('Security')</label>
85+
</div>
86+
87+
<div class="col-sm-9">
88+
<div class="form-group col-sm-8">
89+
<label for="password" class="control-label thin-weight">@lang('Password')</label>
90+
<input type="password" name="password" class="form-control" value="">
91+
</div>
92+
<div class="form-group col-sm-8">
93+
<label for="password_confirmation" class="control-label thin-weight">@lang('Confirm password')</label>
94+
<input type="password" name="password_confirmation" class="form-control" value="">
95+
</div>
7796
</div>
78-
</div>
7997
@endif
8098
<div class="col-sm-12">
8199
<hr>
@@ -84,7 +102,7 @@
84102
<label for="name" class="base-input-label">@lang('Access')</label>
85103
</div>
86104
<div class="col-sm-9">
87-
@if(isset($user) && auth()->user()->canChangeRole())
105+
@if(auth()->user()->canChangeRole())
88106
<div class="form-group col-sm-8">
89107
<label for="roles" class="control-label thin-weight">@lang('Assign role')</label>
90108
<select name="roles" id="" class="form-control">

0 commit comments

Comments
 (0)