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
833cddb4
Commit
833cddb4
authored
Nov 28, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
aedb3fe5
'
* commit '
aedb3fe5
': Squashed 'Modules/User/' changes from f048f16..5b82381
parents
b60516f5
aedb3fe5
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
96 additions
and
34 deletions
+96
-34
SentinelGroupSeedTableSeeder.php
...es/User/Database/Seeders/SentinelGroupSeedTableSeeder.php
+2
-0
SentryGroupSeedTableSeeder.php
Modules/User/Database/Seeders/SentryGroupSeedTableSeeder.php
+2
-0
RolesController.php
Modules/User/Http/Controllers/Admin/RolesController.php
+4
-3
UserController.php
Modules/User/Http/Controllers/Admin/UserController.php
+4
-4
AuthController.php
Modules/User/Http/Controllers/AuthController.php
+9
-10
messages.php
Modules/User/Resources/lang/en/messages.php
+24
-0
messages.php
Modules/User/Resources/lang/fr/messages.php
+24
-0
index.blade.php
Modules/User/Resources/views/admin/roles/index.blade.php
+13
-8
index.blade.php
Modules/User/Resources/views/admin/users/index.blade.php
+13
-8
login.blade.php
Modules/User/Resources/views/public/login.blade.php
+1
-1
No files found.
Modules/User/Database/Seeders/SentinelGroupSeedTableSeeder.php
View file @
833cddb4
...
...
@@ -83,6 +83,8 @@ class SentinelGroupSeedTableSeeder extends Seeder
'media.edit'
=>
true
,
'media.update'
=>
true
,
'media.destroy'
=>
true
,
/* Settings */
'settings.index'
=>
true
,
];
$group
->
save
();
...
...
Modules/User/Database/Seeders/SentryGroupSeedTableSeeder.php
View file @
833cddb4
...
...
@@ -66,6 +66,8 @@ class SentryGroupSeedTableSeeder extends Seeder
'media.edit'
=>
1
,
'media.update'
=>
1
,
'media.destroy'
=>
1
,
/* Settings */
'settings.index'
=>
1
,
],
));
...
...
Modules/User/Http/Controllers/Admin/RolesController.php
View file @
833cddb4
...
...
@@ -56,7 +56,7 @@ class RolesController extends BaseUserModuleController
$this
->
role
->
create
(
$data
);
Flash
::
success
(
'Role created'
);
Flash
::
success
(
trans
(
'user::messages.role created'
)
);
return
Redirect
::
route
(
'dashboard.role.index'
);
}
...
...
@@ -69,6 +69,7 @@ class RolesController extends BaseUserModuleController
public
function
edit
(
$id
)
{
if
(
!
$role
=
$this
->
role
->
find
(
$id
))
{
Flash
::
error
(
trans
(
'user::messages.role not found'
));
return
Redirect
::
to
(
'user::admin.roles.index'
);
}
...
...
@@ -88,7 +89,7 @@ class RolesController extends BaseUserModuleController
$this
->
role
->
update
(
$id
,
$data
);
Flash
::
success
(
'Role updated!'
);
Flash
::
success
(
trans
(
'user::messages.role updated'
)
);
return
Redirect
::
route
(
'dashboard.role.index'
);
}
...
...
@@ -102,7 +103,7 @@ class RolesController extends BaseUserModuleController
{
$this
->
role
->
delete
(
$id
);
Flash
::
success
(
'Role deleted!'
);
Flash
::
success
(
trans
(
'user::messages.role deleted'
)
);
return
Redirect
::
route
(
'dashboard.role.index'
);
}
...
...
Modules/User/Http/Controllers/Admin/UserController.php
View file @
833cddb4
...
...
@@ -77,7 +77,7 @@ class UserController extends BaseUserModuleController
$this
->
user
->
createWithRoles
(
$data
,
$request
->
roles
,
true
);
Flash
::
success
(
'User created.'
);
Flash
::
success
(
trans
(
'user::messages.user created'
)
);
return
Redirect
::
route
(
'dashboard.user.index'
);
}
...
...
@@ -90,7 +90,7 @@ class UserController extends BaseUserModuleController
public
function
edit
(
$id
)
{
if
(
!
$user
=
$this
->
user
->
find
(
$id
))
{
Flash
::
error
(
'User not found'
);
Flash
::
error
(
trans
(
'user::messages.user not found'
)
);
return
Redirect
::
route
(
'dashboard.user.index'
);
}
$roles
=
$this
->
role
->
all
();
...
...
@@ -111,7 +111,7 @@ class UserController extends BaseUserModuleController
$this
->
user
->
updateAndSyncRoles
(
$id
,
$data
,
$request
->
roles
);
Flash
::
success
(
'User updated.'
);
Flash
::
success
(
trans
(
'user::messages.user updated'
)
);
return
Redirect
::
route
(
'dashboard.user.index'
);
}
...
...
@@ -125,7 +125,7 @@ class UserController extends BaseUserModuleController
{
$this
->
user
->
delete
(
$id
);
Flash
::
success
(
'User deleted'
);
Flash
::
success
(
trans
(
'user::messages.user deleted'
)
);
return
Redirect
::
route
(
'dashboard.user.index'
);
}
...
...
Modules/User/Http/Controllers/AuthController.php
View file @
833cddb4
...
...
@@ -41,7 +41,7 @@ class AuthController
$error
=
$this
->
auth
->
login
(
$credentials
,
$remember
);
if
(
!
$error
)
{
Flash
::
success
(
'Successfully logged in.'
);
Flash
::
success
(
trans
(
'user::messages.successfully logged in'
)
);
return
Redirect
::
intended
(
'/'
);
}
...
...
@@ -58,7 +58,7 @@ class AuthController
{
$this
->
execute
(
'Modules\User\Commands\RegisterNewUserCommand'
,
$request
->
all
());
Flash
::
success
(
'Account created. Please check your email to activate your account.'
);
Flash
::
success
(
trans
(
'user::messages.account created check email for activation'
)
);
return
Redirect
::
route
(
'register'
);
}
...
...
@@ -73,10 +73,10 @@ class AuthController
public
function
getActivate
(
$userId
,
$code
)
{
if
(
$this
->
auth
->
activate
(
$userId
,
$code
))
{
Flash
::
success
(
'Account activated. You can now login.'
);
Flash
::
success
(
trans
(
'user::messages.account activated you can now login'
)
);
return
Redirect
::
route
(
'login'
);
}
Flash
::
error
(
'There was an error with the activation.'
);
Flash
::
error
(
lang
(
'user::messages.there was an error with the activation'
)
);
return
Redirect
::
route
(
'register'
);
}
...
...
@@ -90,13 +90,12 @@ class AuthController
try
{
$this
->
execute
(
'Modules\User\Commands\BeginResetProcessCommand'
,
$request
->
all
());
}
catch
(
UserNotFoundException
$e
)
{
Flash
::
error
(
'No user with that email address belongs in our system.'
);
Flash
::
error
(
trans
(
'user::messages.no user found'
)
);
return
Redirect
::
back
()
->
withInput
();
}
Flash
::
success
(
'Check your email to reset your password.'
);
Flash
::
success
(
trans
(
'user::messages.check email to reset password'
));
return
Redirect
::
route
(
'reset'
);
}
...
...
@@ -113,14 +112,14 @@ class AuthController
array_merge
(
$request
->
all
(),
[
'userId'
=>
$userId
,
'code'
=>
$code
])
);
}
catch
(
UserNotFoundException
$e
)
{
Flash
::
error
(
'The user no longer exists.'
);
Flash
::
error
(
trans
(
'user::messages.user no longer exists'
)
);
return
Redirect
::
back
()
->
withInput
();
}
catch
(
InvalidOrExpiredResetCode
$e
)
{
Flash
::
error
(
'Invalid or expired reset code.'
);
Flash
::
error
(
trans
(
'user::messages.invalid reset code'
)
);
return
Redirect
::
back
()
->
withInput
();
}
Flash
::
success
(
'Password has been reset. You can now login with your new password.'
);
Flash
::
success
(
trans
(
'user::messages.password reset'
)
);
return
Redirect
::
route
(
'login'
);
}
}
Modules/User/Resources/lang/en/messages.php
0 → 100644
View file @
833cddb4
<?php
return
[
/* Authentication */
'successfully logged in'
=>
'Successfully logged in'
,
'account created check email for activation'
=>
'Account created. Please check your email to activate your account.'
,
'account activated you can now login'
=>
'Account activated. You can now login.'
,
'there was an error with the activation'
=>
'There was an error with the activation.'
,
'no user found'
=>
'No user with that email address belongs in our system.'
,
'check email to reset password'
=>
'Check your email to reset your password.'
,
'user no longer exists'
=>
'The user no longer exists.'
,
'invalid reset code'
=>
'Invalid or expired reset code.'
,
'password reset'
=>
'Password has been reset. You can now login with your new password.'
,
/* User management */
'user created'
=>
'User successfully created.'
,
'user not found'
=>
'User not found.'
,
'user updated'
=>
'User successfully updated.'
,
'user deleted'
=>
'User successfully deleted.'
,
/* Role management */
'role created'
=>
'Role successfully created.'
,
'role not found'
=>
'Role not found.'
,
'role updated'
=>
'Role successfully updated.'
,
'role deleted'
=>
'Role successfully deleted.'
,
];
Modules/User/Resources/lang/fr/messages.php
0 → 100644
View file @
833cddb4
<?php
return
[
/* Authentication */
'successfully logged in'
=>
'Authentification réussie'
,
'account created check email for activation'
=>
'Compte créer. Contrôller vos emails pour activer votre compte.'
,
'account activated you can now login'
=>
'Compte activer. Vous pouvez désaprésent vous authentifier.'
,
'there was an error with the activation'
=>
'Une erreur s\'est produite pendant l\'activation'
,
'no user found'
=>
'Aucun utilisateur ne correspond a cette addresse email.'
,
'check email to reset password'
=>
'Contrôller vos emails pour réinitialiser votre mot de passe.'
,
'user no longer exists'
=>
'Cet utilisateur n\'existe plus.'
,
'invalid reset code'
=>
'Code de réinitialisation non valide ou expirer.'
,
'password reset'
=>
'Mot de passe réinitialiser. Vous pouvez vous authentifier avec votre nouveau mot de passe.'
,
/* User management */
'user created'
=>
'Utilisateur créer.'
,
'user not found'
=>
'Utilisateur non trouvé.'
,
'user updated'
=>
'Utilisateur mit à jour.'
,
'user deleted'
=>
'Utilisateur suprimer'
,
/* Role management */
'role created'
=>
'Role créer.'
,
'role not found'
=>
'Role non trouvé.'
,
'role updated'
=>
'Role mit à jour.'
,
'role deleted'
=>
'Role suprimer'
,
];
Modules/User/Resources/views/admin/roles/index.blade.php
View file @
833cddb4
...
...
@@ -100,19 +100,24 @@
@stop
@section('scripts')
<?php
$locale
=
App
::
getLocale
();
?>
<script
type=
"text/javascript"
>
$
(
function
()
{
$
(
'
.data-table
'
).
dataTable
({
"
bPaginate
"
:
true
,
"
bLengthChange
"
:
true
,
"
bFilter
"
:
true
,
"
bSort
"
:
true
,
"
bInfo
"
:
true
,
"
bAutoWidth
"
:
true
,
"
aoColumns
"
:
[
"
paginate
"
:
true
,
"
lengthChange
"
:
true
,
"
filter
"
:
true
,
"
sort
"
:
true
,
"
info
"
:
true
,
"
autoWidth
"
:
true
,
"
order
"
:
[[
0
,
"
desc
"
]],
"
language
"
:
{
"
url
"
:
'
<?php
echo
Module
::
asset
(
"core:js/vendor/datatables/
{
$locale
}
.json"
)
?>
'
},
"
columns
"
:
[
null
,
null
,
{
"
bS
ortable
"
:
false
}
{
"
s
ortable
"
:
false
}
]
});
});
...
...
Modules/User/Resources/views/admin/users/index.blade.php
View file @
833cddb4
...
...
@@ -116,21 +116,26 @@
@stop
@section('scripts')
<?php
$locale
=
App
::
getLocale
();
?>
<script
type=
"text/javascript"
>
$
(
function
()
{
$
(
'
.data-table
'
).
dataTable
({
"
bPaginate
"
:
true
,
"
bLengthChange
"
:
true
,
"
bFilter
"
:
true
,
"
bSort
"
:
true
,
"
bInfo
"
:
true
,
"
bAutoWidth
"
:
true
,
"
aoColumns
"
:
[
"
paginate
"
:
true
,
"
lengthChange
"
:
true
,
"
filter
"
:
true
,
"
sort
"
:
true
,
"
info
"
:
true
,
"
autoWidth
"
:
true
,
"
order
"
:
[[
0
,
"
desc
"
]],
"
language
"
:
{
"
url
"
:
'
<?php
echo
Module
::
asset
(
"core:js/vendor/datatables/
{
$locale
}
.json"
)
?>
'
},
"
columns
"
:
[
null
,
null
,
null
,
null
,
{
"
bS
ortable
"
:
false
}
{
"
s
ortable
"
:
false
}
]
});
});
...
...
Modules/User/Resources/views/public/login.blade.php
View file @
833cddb4
...
...
@@ -25,7 +25,7 @@ Login | @parent
</div>
</div>
<div class="
footer
">
<button type="
submit
" class="
btn
b
g
-
olive
btn
-
block
">Sign me in</button>
<button type="
submit
" class="
btn
b
tn
-
info
btn
-
block
">Sign me in</button>
<p><a href="
{{
URL
::
route
(
'reset'
)}}
">I forgot my password</a></p>
<a href="
{{
URL
::
route
(
'register'
)}}
" class="
text
-
center
">Register a new membership</a>
</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