Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
1c7f767a
Commit
1c7f767a
authored
Oct 28, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
b7a4a21b
'
* commit '
b7a4a21b
': Squashed 'Modules/User/' changes from 3b77eb6..9ef6f40
parents
d1afd6fc
b7a4a21b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
12 deletions
+33
-12
BeginResetProcessCommandHandler.php
Modules/User/Commands/BeginResetProcessCommandHandler.php
+0
-2
RegisterNewUserCommandHandler.php
Modules/User/Commands/RegisterNewUserCommandHandler.php
+0
-1
AuthController.php
Modules/User/Http/Controllers/AuthController.php
+1
-1
GuestFilter.php
Modules/User/Http/Filters/GuestFilter.php
+19
-4
SentinelAuthentication.php
...les/User/Repositories/Sentinel/SentinelAuthentication.php
+9
-0
create.blade.php
Modules/User/Resources/views/admin/roles/create.blade.php
+2
-2
edit.blade.php
Modules/User/Resources/views/admin/roles/edit.blade.php
+2
-2
No files found.
Modules/User/Commands/BeginResetProcessCommandHandler.php
View file @
1c7f767a
<?php
namespace
Modules\User\Commands
;
<?php
namespace
Modules\User\Commands
;
use
Cartalyst\Sentinel\Laravel\Facades\Reminder
;
use
Cartalyst\Sentinel\Laravel\Facades\Sentinel
;
use
Illuminate\Support\Facades\Event
;
use
Illuminate\Support\Facades\Event
;
use
Laracasts\Commander\CommandHandler
;
use
Laracasts\Commander\CommandHandler
;
use
Modules\User\Events\UserHasBegunResetProcess
;
use
Modules\User\Events\UserHasBegunResetProcess
;
...
...
Modules/User/Commands/RegisterNewUserCommandHandler.php
View file @
1c7f767a
<?php
namespace
Modules\User\Commands
;
<?php
namespace
Modules\User\Commands
;
use
Cartalyst\Sentinel\Laravel\Facades\Sentinel
;
use
Illuminate\Support\Facades\Event
;
use
Illuminate\Support\Facades\Event
;
use
Laracasts\Commander\CommandHandler
;
use
Laracasts\Commander\CommandHandler
;
use
Modules\User\Events\UserHasRegistered
;
use
Modules\User\Events\UserHasRegistered
;
...
...
Modules/User/Http/Controllers/AuthController.php
View file @
1c7f767a
...
@@ -42,7 +42,7 @@ class AuthController
...
@@ -42,7 +42,7 @@ class AuthController
$error
=
$this
->
auth
->
login
(
$credentials
,
$remember
);
$error
=
$this
->
auth
->
login
(
$credentials
,
$remember
);
if
(
!
$error
)
{
if
(
!
$error
)
{
Flash
::
success
(
'Successfully logged in.'
);
Flash
::
success
(
'Successfully logged in.'
);
return
Redirect
::
route
(
'dashboard.index
'
);
return
Redirect
::
intended
(
'/
'
);
}
}
Flash
::
error
(
$error
);
Flash
::
error
(
$error
);
...
...
Modules/User/Http/Filters/GuestFilter.php
View file @
1c7f767a
<?php
namespace
Modules\User\Http\Filters
;
<?php
namespace
Modules\User\Http\Filters
;
use
Cartalyst\Sentinel\Laravel\Facades\Sentinel
;
use
Illuminate\Routing\Redirector
;
use
Illuminate\Support\Facades\Redirect
;
use
Modules\Core\Contracts\Authentication
;
class
GuestFilter
class
GuestFilter
{
{
/**
* @var Authentication
*/
private
$auth
;
/**
* @var Redirector
*/
private
$redirect
;
public
function
__construct
(
Authentication
$auth
,
Redirector
$redirect
)
{
$this
->
auth
=
$auth
;
$this
->
redirect
=
$redirect
;
}
public
function
filter
()
public
function
filter
()
{
{
if
(
Sentinel
::
check
())
{
if
(
$this
->
auth
->
check
())
{
return
Redirect
::
route
(
'dashboard.index'
);
return
$this
->
redirect
->
route
(
'dashboard.index'
);
}
}
}
}
}
}
Modules/User/Repositories/Sentinel/SentinelAuthentication.php
View file @
1c7f767a
...
@@ -116,4 +116,13 @@ class SentinelAuthentication implements Authentication
...
@@ -116,4 +116,13 @@ class SentinelAuthentication implements Authentication
{
{
return
Sentinel
::
hasAccess
(
$permission
);
return
Sentinel
::
hasAccess
(
$permission
);
}
}
/**
* Check if the user is logged in
* @return mixed
*/
public
function
check
()
{
return
Sentinel
::
check
();
}
}
}
Modules/User/Resources/views/admin/roles/create.blade.php
View file @
1c7f767a
...
@@ -32,14 +32,14 @@
...
@@ -32,14 +32,14 @@
<div class="
col
-
sm
-
6
">
<div class="
col
-
sm
-
6
">
<div class="
form
-
group
{{
$errors
->
has
(
'name'
)
?
' has-error'
:
''
}}
">
<div class="
form
-
group
{{
$errors
->
has
(
'name'
)
?
' has-error'
:
''
}}
">
{!! Form::label('name', trans('user::roles.form.name')) !!}
{!! Form::label('name', trans('user::roles.form.name')) !!}
{!! Form::text('name', Input::old('name'), ['class' => 'form-control', 'placeholder' => trans('user::roles.form.name')]) !!}
{!! Form::text('name', Input::old('name'), ['class' => 'form-control
slugify
', 'placeholder' => trans('user::roles.form.name')]) !!}
{!!
$errors->first
('name', '<span class="
help
-
block
">:message</span>') !!}
{!!
$errors->first
('name', '<span class="
help
-
block
">:message</span>') !!}
</div>
</div>
</div>
</div>
<div class="
col
-
sm
-
6
">
<div class="
col
-
sm
-
6
">
<div class="
form
-
group
{{
$errors
->
has
(
'slug'
)
?
' has-error'
:
''
}}
">
<div class="
form
-
group
{{
$errors
->
has
(
'slug'
)
?
' has-error'
:
''
}}
">
{!! Form::label('slug', trans('user::roles.form.slug')) !!}
{!! Form::label('slug', trans('user::roles.form.slug')) !!}
{!! Form::text('slug', Input::old('slug'), ['class' => 'form-control', 'placeholder' => trans('user::roles.form.slug')]) !!}
{!! Form::text('slug', Input::old('slug'), ['class' => 'form-control
slug
', 'placeholder' => trans('user::roles.form.slug')]) !!}
{!!
$errors->first
('slug', '<span class="
help
-
block
">:message</span>') !!}
{!!
$errors->first
('slug', '<span class="
help
-
block
">:message</span>') !!}
</div>
</div>
</div>
</div>
...
...
Modules/User/Resources/views/admin/roles/edit.blade.php
View file @
1c7f767a
...
@@ -35,14 +35,14 @@
...
@@ -35,14 +35,14 @@
<div class="
col
-
sm
-
6
">
<div class="
col
-
sm
-
6
">
<div class="
form
-
group
{{
$errors
->
has
(
'name'
)
?
' has-error'
:
''
}}
">
<div class="
form
-
group
{{
$errors
->
has
(
'name'
)
?
' has-error'
:
''
}}
">
{!! Form::label('name', trans('user::roles.form.name')) !!}
{!! Form::label('name', trans('user::roles.form.name')) !!}
{!! Form::text('name', Input::old('name',
$role->name
), ['class' => 'form-control', 'placeholder' => trans('user::roles.form.name')]) !!}
{!! Form::text('name', Input::old('name',
$role->name
), ['class' => 'form-control
slugify
', 'placeholder' => trans('user::roles.form.name')]) !!}
{!!
$errors->first
('name', '<span class="
help
-
block
">:message</span>') !!}
{!!
$errors->first
('name', '<span class="
help
-
block
">:message</span>') !!}
</div>
</div>
</div>
</div>
<div class="
col
-
sm
-
6
">
<div class="
col
-
sm
-
6
">
<div class="
form
-
group
{{
$errors
->
has
(
'slug'
)
?
' has-error'
:
''
}}
">
<div class="
form
-
group
{{
$errors
->
has
(
'slug'
)
?
' has-error'
:
''
}}
">
{!! Form::label('slug', trans('user::roles.form.slug')) !!}
{!! Form::label('slug', trans('user::roles.form.slug')) !!}
{!! Form::text('slug', Input::old('slug',
$role->slug
), ['class' => 'form-control', 'placeholder' => trans('user::roles.form.slug')]) !!}
{!! Form::text('slug', Input::old('slug',
$role->slug
), ['class' => 'form-control
slug
', 'placeholder' => trans('user::roles.form.slug')]) !!}
{!!
$errors->first
('slug', '<span class="
help
-
block
">:message</span>') !!}
{!!
$errors->first
('slug', '<span class="
help
-
block
">:message</span>') !!}
</div>
</div>
</div>
</div>
...
...
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