Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
L
Liman MYS - Çekirdek
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
liman
Liman MYS - Çekirdek
Commits
f7603bbe
Kaydet (Commit)
f7603bbe
authored
Mar 26, 2019
tarafından
mertcelen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
-User Add added.
-User Remove added. -User Password Reset added.
üst
f40d15d1
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
152 additions
and
59 deletions
+152
-59
_routes.php
app/Http/Controllers/Auth/_routes.php
+0
-3
UserController.php
app/Http/Controllers/UserController.php
+67
-1
adminlte.php
config/adminlte.php
+1
-1
login.blade.php
resources/views/auth/login.blade.php
+0
-7
email.blade.php
resources/views/auth/passwords/email.blade.php
+0
-2
reset.blade.php
resources/views/auth/passwords/reset.blade.php
+0
-2
register.blade.php
resources/views/auth/register.blade.php
+0
-2
verify.blade.php
resources/views/auth/verify.blade.php
+0
-24
index.blade.php
resources/views/settings/index.blade.php
+74
-17
web.php
routes/web.php
+10
-0
No files found.
app/Http/Controllers/Auth/_routes.php
Dosyayı görüntüle @
f7603bbe
...
...
@@ -3,6 +3,3 @@
Route
::
get
(
'/giris'
,
'Auth\LoginController@showLoginForm'
)
->
name
(
'login'
);
Route
::
post
(
'/giris'
,
'Auth\LoginController@login'
);
Route
::
post
(
'/cikis'
,
'Auth\LogoutController@logout'
)
->
name
(
'logout'
);
Route
::
get
(
'register'
,
'Auth\RegisterController@showRegistrationForm'
)
->
name
(
'register'
);
Route
::
post
(
'register'
,
'Auth\RegisterController@register'
);
app/Http/Controllers/UserController.php
Dosyayı görüntüle @
f7603bbe
...
...
@@ -2,16 +2,82 @@
namespace
App\Http\Controllers
;
use
App\Permission
;
use
App\User
;
use
Illuminate\Support\Facades\Validator
;
use
Illuminate\Support\Str
;
use
Illuminate\Support\Facades\Hash
;
class
UserController
extends
Controller
{
public
function
one
(){
public
function
one
()
{
$user
=
User
::
where
(
'_id'
,
\Auth
::
id
())
->
first
();
return
view
(
'users.one'
,[
"user"
=>
$user
]);
}
public
function
add
()
{
$flag
=
Validator
::
make
(
request
()
->
all
(),
[
'name'
=>
[
'required'
,
'string'
,
'max:255'
],
'email'
=>
[
'required'
,
'string'
,
'email'
,
'max:255'
,
'unique:users'
],
]);
try
{
$flag
->
validate
();
}
catch
(
\Exception
$exception
){
return
respond
(
"Lütfen geçerli veri giriniz."
,
201
);
}
// Check If user already exists.
if
(
User
::
where
(
'email'
,
request
(
'email'
))
->
exists
()){
return
respond
(
"Bu email adresi ile ekli bir kullanıcı zaten var."
,
201
);
}
// Generate Password
$password
=
Str
::
random
(
8
);
// Create And Fill User Data
$user
=
User
::
create
([
'name'
=>
request
(
'name'
),
'email'
=>
request
(
'email'
),
'password'
=>
Hash
::
make
(
$password
),
'settings'
=>
[],
'status'
=>
(
request
(
'type'
)
==
"administrator"
)
?
"1"
:
"0"
]);
// Create Permissions For User
Permission
::
new
(
$user
->
_id
);
// Respond
return
respond
(
"Kullanıcı Başarıyla Eklendi. Parola : "
.
$password
,
200
);
}
public
function
remove
()
{
// Delete Permissions
Permission
::
where
(
'user_id'
,
request
(
'user_id'
))
->
delete
();
// Delete User
User
::
find
(
request
(
'user_id'
))
->
delete
();
// Respond
return
respond
(
"Kullanıcı Silindi"
,
200
);
}
public
function
passwordReset
()
{
// Generate Password
$password
=
Str
::
random
(
8
);
$user
=
User
::
find
(
request
(
'user_id'
))
->
update
([
"password"
=>
Hash
::
make
(
$password
)
]);
return
respond
(
"Yeni Parola : "
.
$password
,
200
);
}
}
config/adminlte.php
Dosyayı görüntüle @
f7603bbe
...
...
@@ -141,7 +141,7 @@ return [
'icon'
=>
'lock'
,
],
[
'text'
=>
'
İzin Ayarları
'
,
'text'
=>
'
Ayarlar
'
,
'url'
=>
'/ayarlar'
,
'icon'
=>
'plus'
,
],
...
...
resources/views/auth/login.blade.php
Dosyayı görüntüle @
f7603bbe
...
...
@@ -55,13 +55,6 @@
<!-- /.col -->
</div>
</form>
<div class="
auth
-
links
">
@if (config('adminlte.register_url', 'register'))
<a href="
{{
url
(
config
(
'adminlte.register_url'
,
'register'
))
}}
"
class="
text
-
center
"
>{{ trans('adminlte::adminlte.register_a_new_membership') }}</a>
@endif
</div>
</div>
<!-- /.login-box-body -->
</div><!-- /.login-box -->
...
...
resources/views/auth/passwords/email.blade.php
deleted
100644 → 0
Dosyayı görüntüle @
f40d15d1
@
extends
(
'adminlte::passwords.email'
)
\ No newline at end of file
resources/views/auth/passwords/reset.blade.php
deleted
100644 → 0
Dosyayı görüntüle @
f40d15d1
@
extends
(
'adminlte::passwords.reset'
)
\ No newline at end of file
resources/views/auth/register.blade.php
deleted
100644 → 0
Dosyayı görüntüle @
f40d15d1
@
extends
(
'adminlte::register'
)
\ No newline at end of file
resources/views/auth/verify.blade.php
deleted
100644 → 0
Dosyayı görüntüle @
f40d15d1
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
="
container
">
<div class="
row
justify
-
content
-
center
">
<div class="
col
-
md
-
8
">
<div class="
card
">
<div class="
card
-
header
">{{ __('Verify Your Email Address') }}</div>
<div class="
card
-
body
">
@if (session('resent'))
<div class="
alert
alert
-
success
" role="
alert
">
{{ __('A fresh verification link has been sent to your email address.') }}
</div>
@endif
{{ __('Before proceeding, please check your email for a verification link.') }}
{{ __('If you did not receive the email') }}, <a href="
{{
route
(
'verification.resend'
)
}}
">{{ __('click here to request another') }}</a>.
</div>
</div>
</div>
</div>
</div>
@endsection
resources/views/settings/index.blade.php
Dosyayı görüntüle @
f7603bbe
...
...
@@ -4,26 +4,82 @@
<
nav
aria
-
label
=
"breadcrumb"
>
<
ol
class
="
breadcrumb
">
<li class="
breadcrumb
-
item
"><a href="
{{
route
(
'home'
)}}
">{{__("
Ana
Sayfa
")}}</a></li>
<li class="
breadcrumb
-
item
active
" aria-current="
page
">{{__("
Sistem
Ayarları
")}}</li>
<li class="
breadcrumb
-
item
active
" aria-current="
page
">
{
{__("
Ayarlar
")}
}
</li>
</ol>
</nav>
@include('l.tree',[
"
data
" => objectToArray(\App\User::all(), "
email
", "
name
"),
"
search
",
"
click
" => "
setDetails
",
"
menu
" => [
"
Parola
Sıfırla
" => "
setDetails
"
@include('l.modal-button',[
"
class
"
=>
"
btn
-
success
",
"
target_id
" => "
add_user
",
"
text
" => "
Kullanıcı
Ekle
"
])<br><br>
@include('l.table',[
"
value
" => \App\User::all(),
"
title
" => [
"
Sunucu
Adı
" , "
Email
" , "
*
hidden
*
" ,
],
"
display
" => [
"
name
" , "
email
", "
_id
:
user_id
" ,
],
"
menu
" => [
"
Yetkileri
Düzenle
" => [
"
target
" => "
edit
",
"
icon
" => "
fa
-
edit
"
],
"
Parolayı
Sıfırla
" => [
"
target
" => "
passwordReset
",
"
icon
" => "
fa
-
lock
"
],
"
Sil
" => [
"
target
" => "
delete
",
"
icon
" => "
fa
-
trash
"
]
])
<script>
function setDetails(data)
{
console.log(data);
}
],
"
onclick
" => "
details
"
])
function passwordReset()
{
}
</script>
@include('l.modal',[
"
id
"=>"
add_user
",
"
title
" => "
Kullanıcı
Ekle
",
"
url
" => route('user_add'),
"
next
" => "
nothing
",
"
selects
" => [
"
Yönetici
:
administrator
" => [
"
-:
administrator
" => "
type
:
hidden
"
],
"
Kullanıcı
:
user
" => [
"
-:
user
" => "
type
:
hidden
"
]
],
"
inputs
" => [
"
Adı
" => "
name
:
text
",
"
E
-
mail
Adresi
" => "
email
:
text
",
],
"
submit_text
" => "
Ekle
"
])
@include('l.modal',[
"
id
"=>"
delete
",
"
title
" =>"
Kullanıcıyı
Sil
",
"
url
" => route('user_remove'),
"
text
" => "
Kullanıcıyı
silmek
istediğinize
emin
misiniz
?
Bu
işlem
geri
alınamayacaktır
.
",
"
next
" => "
reload
",
"
inputs
" => [
"
Kullanici
Id
:
'null'
" => "
user_id
:
hidden
"
],
"
submit_text
" => "
Kullanıcıyı
Sil
"
])
@include('l.modal',[
"
id
"=>"
passwordReset
",
"
title
" =>"
Parolayı
Sıfırla
",
"
url
" => route('user_password_reset'),
"
text
" => "
Parolayı
sıfırlamak
istediğinize
emin
misiniz
?
Bu
işlem
geri
alınamayacaktır
.
",
"
next
" => "
nothing
",
"
inputs
" => [
"
Kullanici
Id
:
'null'
" => "
user_id
:
hidden
"
],
"
submit_text
" => "
Parolayı
Sıfırla
"
])
@endsection
\ No newline at end of file
routes/web.php
Dosyayı görüntüle @
f7603bbe
...
...
@@ -69,6 +69,15 @@ Route::post('/talep', 'HomeController@request')->name('request_send');
Route
::
post
(
'/arama/'
,
'SearchController@index'
)
->
name
(
'search'
);
// Log View Route
Route
::
view
(
'/logs/{log_id}'
,
'logs.one'
);
// User Add
Route
::
post
(
'/kullanici/ekle'
,
'UserController@add'
)
->
name
(
'user_add'
)
->
middleware
(
'admin'
);
// User Remove
Route
::
post
(
'/kullanici/sil'
,
'UserController@remove'
)
->
name
(
'user_remove'
)
->
middleware
(
'admin'
);
// User Remove
Route
::
post
(
'/kullanici/parola/sifirla'
,
'UserController@passwordReset'
)
->
name
(
'user_password_reset'
)
->
middleware
(
'admin'
);
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment