user module became mono

This commit is contained in:
Mostafa Moradi 2024-08-18 18:40:44 +03:00
parent 426936b89f
commit abfd614044
355 changed files with 15723 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#The MIT License (MIT)
###Copyright (c) 2014 AnomalyLabs, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@ -0,0 +1,10 @@
# Users Module
[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://packagist.org/packages/anomaly/users-module)
[![Build Status](https://scrutinizer-ci.com/g/anomalylabs/users-module/badges/build.png?b=master)](https://scrutinizer-ci.com/g/anomalylabs/users-module/build-status/master)
[![Code Quality](http://img.shields.io/scrutinizer/g/anomalylabs/users-module.svg)](https://scrutinizer-ci.com/g/anomalylabs/users-module/)
[![Total Downloads](http://img.shields.io/packagist/dt/anomaly/users-module.svg)](https://packagist.org/packages/anomaly/users-module)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/81982ec5-cbe1-499f-aafc-3d75c747a4fd/small.png)](https://insight.sensiolabs.com/projects/81982ec5-cbe1-499f-aafc-3d75c747a4fd)
Manage users, roles, and permissions.

View File

@ -0,0 +1,45 @@
{
"name": "anomaly/users-module",
"type": "streams-addon",
"description": "Manage users, roles, and permissions.",
"keywords": [
"streams",
"users",
"module"
],
"homepage": "http://pyrocms.com/addons/anomaly/users-module",
"license": "MIT",
"authors": [
{
"name": "PyroCMS, Inc.",
"homepage": "http://pyrocms.com/",
"role": "Owner"
},
{
"name": "Ryan Thompson",
"homepage": "http://ryanthepyro.com/",
"role": "Developer"
}
],
"support": {
"docs": "https://pyrocms.com/documentation/users-module",
"forum": "https://pyrocms.com/forum/channels/users-module",
"slack": "https://pyrocms.com/slack",
"issues": "https://github.com/pyrocms/pyrocms/issues?q=is:issue is:open [users-module]",
"source": "https://github.com/anomalylabs/users-module"
},
"require": {
"anomaly/streams-platform": "^1.8"
},
"autoload": {
"psr-4": {
"Anomaly\\UsersModule\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Anomaly\\UsersModuleTest\\": "tests/",
"Database\\Factories\\Anomaly\\UsersModule\\": "factories/"
}
}
}

View File

@ -0,0 +1,7 @@
---
title: Introduction
---
## Introduction
The Users module provides easy to use and powerful user management , authentication, and authorization.

View File

@ -0,0 +1,21 @@
---
title: Features
---
### Features
The users module comes with everything you need for simple and advanced authentication and authorization needs.
* Registration
* Authentication
* Authorization
* Password Reset
* Login Throttling
* Users & Roles Management
* Addon based permission system.
* Multiple activation scenarios.
* Extension-based Authentication
* Extension-based Security
* Configurable Login Fields
* Integrated with Laravel's `Auth` service.
* Interface Design (implementations your own as needed).

View File

@ -0,0 +1,11 @@
---
title: Installation
---
### Installation
You can install the Users module with the `addon:install` command:
php artisan addon:install anomaly.module.users
> The Users module comes installed with PyroCMS out of the box.{.note}

View File

@ -0,0 +1,31 @@
---
title: Configuration
---
### Configuration
You can override Users module configuration by publishing the addon and modifying the resulting configuration file:
php artisan addon:publish anomaly.module.users
The addon will be published to `/resources/{application}/addons/anomaly/users-module`.
#### Login Field
The `anomaly.module.users::config.login` value determines which field is used for logging in along with the password. Valid options are `email` (default) or `username`.
'login' => env('LOGIN', 'email'),
You can also use the `.env` file to set this value with `LOGIN`.
#### Activation Mode
The `anomaly.module.users::config.activation_mode` value determines how users are activated when they register. A user must be activated in order to login.
'activation_mode' => env('ACTIVATION_MODE', 'email'),
Valid options are:
* `email` - Send an activation email to the user. This is the default mode.
* `manual` - Require an admin to manually activate the user.
* `automatic` - Automatically activate the user when they register.

View File

@ -0,0 +1,7 @@
---
title: Usage
---
## Usage
This section will show you how to use the addon via API and in the view layer.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,574 @@
---
title: Roles
---
### Roles
Roles are groups of users that define what the users has access to via role `permissions`. Roles can also be used as an inclusive test like i.e. "Does this user have the `foo` role?".
#### Role Fields
Below is a list of `fields` in the `roles` stream. Fields are accessed as attributes:
$role->slug;
Same goes for decorated instances in Twig:
{{ role.slug }}
###### Fields
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
name
</td>
<td>
text
</td>
<td>
The name of the role.
</td>
</tr>
<tr>
<td>
slug
</td>
<td>
slug
</td>
<td>
The slug used for API access.
</td>
</tr>
<tr>
<td>
description
</td>
<td>
textarea
</td>
<td>
A description for the role.
</td>
</tr>
<tr>
<td>
permissions
</td>
<td>
textarea
</td>
<td>
A serialized array of role permissions.
</td>
</tr>
</tbody>
</table>
#### Role Interface
This section will go over the features of the `\Anomaly\UsersModule\Role\Contract\RoleInterface` class.
##### RoleInterface::hasPermission()
The `hasPermission` method verifies that the role has the `permission`.
###### Returns: `boolean`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$permission
</td>
<td>
true
</td>
<td>
string
</td>
<td>
none
</td>
<td>
The permission string.
</td>
</tr>
</tbody>
</table>
###### Example
if ($role->hasPermission('vendor.module.example::example.test')) {
// Do something
}
###### Twig
{% if role.hasPermission('vendor.module.example::example.test') %}
{# Do something #}
{% endif %}
##### RoleInterface::hasAnyPermission()
The `hasAnyPermission` method verifies that the role has at least one of the given permissions.
###### Returns: `boolean`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$permissions
</td>
<td>
true
</td>
<td>
array
</td>
<td>
none
</td>
<td>
The array of permissions.
</td>
</tr>
</tbody>
</table>
###### Example
$hasPermission = $role->hasAnyPermission(
['vendor.module.example::example.test', 'vendor.module.example::widget.example']
);
if ($hasPermission) {
// Do something
}
###### Twig
{% set hasPermission = role.hasAnyPermission(
['vendor.module.example::example.test', 'vendor.module.example::widget.example']
) %}
{% if hasPermission %}
{# Do something #}
{% endif %}
#### Role Repository
The `\Anomaly\UsersModule\Role\Contract\RoleRepositoryInterface` class helps you retrieve roles from the database.
##### RoleRepositoryInterface::allButAdmin()
The `allButAdmin` method returns all roles but the `admin` one.
###### Returns: `\Anomaly\UsersModule\Role\RoleCollection`
###### Example
$roles = $repository->allButAdmin();
##### RoleRepositoryInterface::findBySlug()
The `findBySlug` method returns a role by it's slug.
###### Returns: `\Anomaly\UsersModule\Role\Contract\RoleInterface` or `null`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$slug
</td>
<td>
true
</td>
<td>
string
</td>
<td>
none
</td>
<td>
The slug of the role.
</td>
</tr>
</tbody>
</table>
###### Example
$guest = $repository->findBySlug('guest');
##### RoleRepositoryInterface::findByPermission()
The `findByPermission` method returns all roles with the `permission`.
###### Returns: `\Anomaly\UsersModule\Role\RoleCollection`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$permission
</td>
<td>
true
</td>
<td>
string
</td>
<td>
none
</td>
<td>
The permission string.
</td>
</tr>
</tbody>
</table>
###### Example
$roles = $repository->findByPermission('example.module.test::example.test');
// Search for partial-match permissions.
$roles = $repository->findByPermission('example.module.test::*');
##### RoleRepositoryInterface::updatePermissions()
The `updatePermissions` method updates the permissions for a role.
###### Returns: `\Anomaly\UsersModule\Role\Contract\RoleInterface`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$role
</td>
<td>
true
</td>
<td>
object
</td>
<td>
none
</td>
<td>
The role instance.
</td>
</tr>
<tr>
<td>
$permissions
</td>
<td>
true
</td>
<td>
array
</td>
<td>
none
</td>
<td>
The array of role permissions.
</td>
</tr>
</tbody>
</table>
###### Example
$repository->updatePermissions(
$role,
[
'example.module.test::example.test',
'example.module.test::example.foo'
]
);

View File

@ -0,0 +1,155 @@
---
title: Plugin
---
### Plugin
This section will go over how to use the plugin that comes with the Users module.
#### user
The `user` function returns a decorated user instance from the identifier provided.
###### Returns: `\Anomaly\UsersModule\User\UserPresenter` or `null`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$identifier
</td>
<td>
false
</td>
<td>
mixed
</td>
<td>
Will return the active user.
</td>
<td>
The id, email, or username of the user to return.
</td>
</tr>
</tbody>
</table>
###### Twig
Hello {{ user().display_name }}
Sup {{ user('ryanthepyro').first_name }}
#### role
The `role` method returns a decorated role instance from the identifier provided.
###### Returns: `\Anomaly\UsersModule\Role\RolePresenter` or `null`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$identifier
</td>
<td>
true
</td>
<td>
mixed
</td>
<td>
none
</td>
<td>
The ID or slug of the role to return.
</td>
</tr>
</tbody>
</table>
###### Example
{% if role('user').hasPermission('example.module.test::example.test') %}
{# Do something #}
{% endif %}

View File

@ -0,0 +1,7 @@
---
title: Services
---
## Services
This section will introduce you to the various services available in the Users module and how to use them.

View File

@ -0,0 +1,402 @@
### Authentication
This section will introduce you to the authentication service and how to user it.
#### User Authenticator
This class will go over the `\Anomaly\UsersModule\User\UserAuthenticator` class and how to use it.
##### UserAuthenticator::attempt()
The `attempt` method attempts to authorize a user. The `login` method is ran if the authentication succeeds.
###### Returns: `\Anomaly\UsersModule\User\Contract\UserInterface` or `false`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$credentials
</td>
<td>
true
</td>
<td>
array
</td>
<td>
none
</td>
<td>
The credentials array of email/username and password.
</td>
</tr>
<tr>
<td>
$remember
</td>
<td>
false
</td>
<td>
boolean
</td>
<td>
false
</td>
<td>
The "remember me" flag.
</td>
</tr>
</tbody>
</table>
###### Example
$authenticator->attempt(['email' => 'example@domain.com', 'password' => 'secret']);
##### UserAuthenticator::authenticate()
The `authenticate` method authenticates credentials without logging the user in.
###### Returns: `\Anomaly\UsersModule\User\Contract\UserInterface` or `false`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$credentials
</td>
<td>
true
</td>
<td>
array
</td>
<td>
none
</td>
<td>
The credentials array of email/username and password.
</td>
</tr>
</tbody>
</table>
###### Example
$authenticator->authenticate(['email' => 'example@domain.com', 'password' => 'secret password']);
##### UserAuthenticator::login()
The `login` method logs in the user.
###### Returns: `void`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$user
</td>
<td>
true
</td>
<td>
object
</td>
<td>
none
</td>
<td>
The user instance.
</td>
</tr>
</tbody>
</table>
###### Example
$authenticator->login($user);
##### UserAuthenticator::logout()
The `logout` method logs out the user.
###### Returns: `void`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$user
</td>
<td>
true
</td>
<td>
object
</td>
<td>
none
</td>
<td>
The user to logout.
</td>
</tr>
</tbody>
</table>
###### Example
$authenticator->logout($user);
##### UserAuthenticator::kickOut()
The `kickOut` method kicks a user. The `kickOut` method is similar to `logout` but a different event is fired for you to hook into as needed.
###### Returns: `void`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$user
</td>
<td>
true
</td>
<td>
object
</td>
<td>
none
</td>
<td>
The user to kick out.
</td>
</tr>
</tbody>
</table>
###### Example
$authenticator->kickOut($user);

View File

@ -0,0 +1,93 @@
---
title: Security
---
### Security
This section will introduce you to the security checker and how to use it.
#### User Security
This section will introduce the `\Anomaly\UsersModule\User\UserSecurity` class and how to use it.
##### UserSecurity::attempt()
The `attempt` method runs the security checks when an authentication `attempt` is performed.
###### Returns: `\Illuminate\Http\RedirectResponse` or `true`
###### Example
$result = $security->attemp();
##### UserSecurity::check()
The `check` method verifies that a user passes all the security checks.
###### Returns: `\Illuminate\Http\RedirectResponse` or `true`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$user
</td>
<td>
false
</td>
<td>
object
</td>
<td>
none
</td>
<td>
The user instance to check.
</td>
</tr>
</tbody>
</table>
###### Example
$result = $security->check($user);

View File

@ -0,0 +1,79 @@
---
title: Middleware
---
### Middleware
This section will introduce you to the middleware services and how to use them.
#### Authorizing Routes
The Users module load's middleware into the stack that allows you to set custom parameters that ensure the request is made by an authorized user.
##### Authorize By Role
You can authorize a route with `\Anomaly\UsersModule\Http\Middleware\AuthorizeRouteRole` by defining the `anomaly.module.users::role` route parameter;
'example/test' => [
'anomaly.module.users::role' => 'my_role',
'uses' => 'Example/Controller@test'
]
You can also define an array of roles where the user must have at least one:
'example/test' => [
'anomaly.module.users::role' => ['my_role', 'another_role'],
'uses' => 'Example/Controller@test'
]
Additionally you may include an optional redirect path and message in case the user does not pass authorization:
'example/test' => [
'anomaly.module.users::role' => 'my_role',
'anomaly.module.users::redirect' => '/',
'anomaly.module.users::message' => 'Sorry, you do not have access.',
'uses' => 'Example/Controller@test'
]
You can also directly use a route for the redirection:
'example/test' => [
'anomaly.module.users::role' => 'my_role',
'anomaly.module.users::route' => 'vendor.module.example::route.name',
'anomaly.module.users::message' => 'Sorry, you do not have access.',
'uses' => 'Example/Controller@test'
]
##### Authorize By Permission
You can authorize a route with `\Anomaly\UsersModule\Http\Middleware\AuthorizeRoutePermission` by defining the `anomaly.module.users::permission` route parameter;
'example/test' => [
'anomaly.module.users::permission' => 'vendor.module.example::widgets.test',
'uses' => 'Example/Controller@test'
]
You can also define an array of permissions where the user must have at least one:
'example/test' => [
'anomaly.module.users::role' => ['vendor.module.example::widgets.test', 'vendor.module.example::widgets.example'],
'uses' => 'Example/Controller@test'
]
Additionally you may include an optional redirect path and message in case the user does not pass authorization:
'example/test' => [
'anomaly.module.users::permission' => 'vendor.module.example::widgets.test',
'anomaly.module.users::redirect' => '/',
'anomaly.module.users::message' => 'Sorry, you do not have access.',
'uses' => 'Example/Controller@test'
]
You can also directly use a route for the redirection:
'example/test' => [
'anomaly.module.users::role' => 'vendor.module.example::widgets.test',
'anomaly.module.users::route' => 'vendor.module.example::route.name',
'anomaly.module.users::message' => 'Sorry, you do not have access.',
'uses' => 'Example/Controller@test'
]

View File

@ -0,0 +1,7 @@
---
title: Extensions
---
## Extensions
This section will go over the addon extensions and how they work.

View File

@ -0,0 +1,179 @@
---
title: Authenticators
---
### Authenticators
Authenticators are responsible for authenticating credentials and login attempts.
#### Authenticator Extension
This section will go over the `\Anomaly\UsersModule\User\Authenticator\AuthenticatorExtension` class.
##### AuthenticatorExtension::authenticate()
The `authenticate` method is responsible for authenticating the `credentials` and returning `null`, a `user`, or a `redirect`.
###### Returns: `\Anomaly\UsersModule\User\Contract\UserInterface` or `\Illuminate\Http\RedirectResponse` or `null`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$credentials
</td>
<td>
true
</td>
<td>
array
</td>
<td>
none
</td>
<td>
The login information.
</td>
</tr>
</tbody>
</table>
#### Writing Authenticators
This section will show you how to write your own custom authenticator extension.
##### Creating the extension
The first thing we need to do is to use the `make:addon` command to create our extension:
php artisan make:addon anomaly.extension.default_authenticator
##### Extending the authenticator extension
The extension you create must extend the `\Anomaly\UsersModule\User\Authenticator\AuthenticatorExtension` class:
<?php namespace Anomaly\DefaultAuthenticatorExtension;
use Anomaly\DefaultAuthenticatorExtension\Command\AuthenticateCredentials;
use Anomaly\UsersModule\User\Authenticator\AuthenticatorExtension;
use Anomaly\UsersModule\User\Contract\UserInterface;
class DefaultAuthenticatorExtension extends AuthenticatorExtension
{
/**
* This extensions provides a basic
* authenticator for the users module.
*
* @var string
*/
protected $provides = 'anomaly.module.users::authenticator.default';
/**
* Authenticate a set of credentials.
*
* @param array $credentials
* @return null|UserInterface
*/
public function authenticate(array $credentials)
{
return dispatch_sync(new AuthenticateCredentials($credentials));
}
}
You must define the `provides` property as `anomaly.module.users::authenticator.your_widget_slug` so that it's picked up as a supported extension.
##### Authenticating credentials
The primary task of any authenticators is to authenticate a login request. In this example we will use a command thats dispatched within the `authenticate` method to check the credentials:
public function authenticate(array $credentials)
{
return dispatch_sync(new AuthenticateCredentials($credentials));
}
Our `AuthenticateCredentials` command is responsible for the actual work:
<?php namespace Anomaly\DefaultAuthenticatorExtension\Command;
use Anomaly\UsersModule\User\Contract\UserRepositoryInterface;
class AuthenticateCredentials
{
/**
* The credentials to authenticate.
*
* @var array
*/
protected $credentials;
/**
* Create a new AuthenticateCredentials instance.
*
* @param array $credentials
*/
public function __construct(array $credentials)
{
$this->credentials = $credentials;
}
/**
* Handle the command.
*
* @param UserRepositoryInterface $users
* @return \Anomaly\UsersModule\User\Contract\UserInterface|null
*/
public function handle(UserRepositoryInterface $users)
{
if (!isset($this->credentials['password']) && !isset($this->credentials['email'])) {
return null;
}
return $users->findByCredentials($this->credentials);
}
}
##### Redirecting authentication requests
The `authenticate` method can return an instance of the user, null, or a redirect instance. In the case a redirect is returns the request will be redirected immediately. After the redirect is made the authentication will be in your hands!

View File

@ -0,0 +1,208 @@
---
title: Security Checks
---
### Security Checks
Security checks are responsible for filtering login attempts and users. For example a security check could enforce that a certain criteria is met by the user. Or check that the login form is not being flooded.
#### Security Check Extension
This section will go over the `\Anomaly\UsersModule\User\Security\Contract\SecurityCheckInterface` class.
##### SecurityCheckExtension::attempt()
The `attempt` method is used to check security during a login attempt.
###### Returns: `\Illuminate\Http\RedirectResponse` or `true`
##### SecurityCheckExtension::check()
The `check` method is run during each request against a user.
###### Returns: `\Illuminate\Http\RedirectResponse` or `true`
###### Arguments
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Key</th>
<th>Required</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
$user
</td>
<td>
false
</td>
<td>
`UserInterface`
</td>
<td>
null
</td>
<td>
The user to check security for.
</td>
</tr>
</tbody>
</table>
#### Writing Security Checks
This section will show you how to write your own custom security check extension.
##### Creating the extension
The first thing we need to do is to use the `make:addon` command to create our extension:
php artisan make:addon anomaly.extension.user_security_check
##### Extending the security check extension
The extension you create must extend the `\Anomaly\UsersModule\User\Security\SecurityCheckExtension` class:
<?php namespace Anomaly\UserSecurityCheckExtension;
use Anomaly\UserSecurityCheckExtension\Command\CheckUser;
use Anomaly\UsersModule\User\Contract\UserInterface;
use Anomaly\UsersModule\User\Security\SecurityCheckExtension;
use Symfony\Component\HttpFoundation\Response;
class UserSecurityCheckExtension extends SecurityCheckExtension
{
/**
* This extension provides a security check that
* assures the user is active, enabled, etc.
*
* @var null|string
*/
protected $provides = 'anomaly.module.users::security_check.user';
/**
* Check an HTTP request.
*
* @param UserInterface $user
* @return bool|Response
*/
public function check(UserInterface $user = null)
{
if (!$user) {
return true;
}
return dispatch_sync(new CheckUser($user));
}
}
You must define the `provides` property as `anomaly.module.users::security_check.your_widget_slug` so that it's picked up as a supported extension.
##### Validating security
The primary task of any security check is to validate a user. In this example we will use a command thats dispatched within the `check` method to check the user over and make sure they are valid and allowed:
public function check(UserInterface $user = null)
{
if (!$user) {
return true;
}
return dispatch_sync(new CheckUser($user));
}
Our `CheckUser` command is responsible for the actual work:
<?php namespace Anomaly\UserSecurityCheckExtension\Command;
use Anomaly\Streams\Platform\Message\MessageBag;
use Anomaly\UsersModule\User\Contract\UserInterface;
use Anomaly\UsersModule\User\UserAuthenticator;
use Illuminate\Routing\Redirector;
class CheckUser
{
/**
* The user instance.
*
* @var UserInterface
*/
protected $user;
/**
* Create a new CheckUser instance.
*
* @param UserInterface $user
*/
public function __construct(UserInterface $user)
{
$this->user = $user;
}
/**
* @param UserAuthenticator $authenticator
* @param MessageBag $message
* @param Redirector $redirect
* @return bool|\Illuminate\Http\RedirectResponse
*/
public function handle(UserAuthenticator $authenticator, MessageBag $message, Redirector $redirect)
{
if (!$this->user->isActivated()) {
$message->error('Your account has not been activated.');
$authenticator->logout(); // Just in case.
return $redirect->back();
}
if (!$this->user->isEnabled()) {
$message->error('Your account has been disabled.');
$authenticator->logout(); // Just in case.
return $redirect->back();
}
return true;
}
}

View File

@ -0,0 +1,31 @@
<?php
namespace Database\Factories\Anomaly\UsersModule\Role;
use Anomaly\UsersModule\Role\RoleModel;
use Illuminate\Database\Eloquent\Factories\Factory;
class RoleModelFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = RoleModel::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'slug' => $this->faker->slug,
'name' => $this->faker->word,
'description' => $this->faker->words(3, true),
'permissions' => ["anomaly.module.users::users.read"]
];
}
}

View File

@ -0,0 +1,36 @@
<?php
namespace Database\Factories\Anomaly\UsersModule\User;
use Anomaly\UsersModule\User\UserModel;
use Illuminate\Database\Eloquent\Factories\Factory;
class UserModelFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = UserModel::class;
/**
* Define the model's default state.
*
* @return array
*/
public function definition()
{
return [
'username' => $this->faker->userName,
'first_name' => $this->faker->firstName,
'last_name' => $this->faker->lastName,
'display_name' => $this->faker->name,
'email' => $this->faker->safeEmail,
'password' => bcrypt('secret'),
'activated' => 1,
'enabled' => 1,
'permissions' => ["anomaly.module.users::users.read"]
];
}
}

View File

@ -0,0 +1,76 @@
<?php
use Anomaly\Streams\Platform\Database\Migration\Migration;
use Anomaly\UsersModule\Role\RoleModel;
/**
* Class AnomalyModuleUsersCreateUsersFields
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <support@pyrocms.com>
* @author Ryan Thompson <ryan@pyrocms.com>
*/
class AnomalyModuleUsersCreateUsersFields extends Migration
{
/**
* The addon fields.
*
* @var array
*/
protected $fields = [
'email' => 'anomaly.field_type.email',
'username' => [
'type' => 'anomaly.field_type.slug',
'config' => [
'type' => '_',
'lowercase' => false,
],
],
'password' => [
'type' => 'anomaly.field_type.text',
'config' => [
'type' => 'password',
],
],
'remember_token' => 'anomaly.field_type.text',
'ip_address' => 'anomaly.field_type.text',
'last_login_at' => 'anomaly.field_type.datetime',
'last_activity_at' => 'anomaly.field_type.datetime',
'permissions' => 'anomaly.field_type.checkboxes',
'display_name' => 'anomaly.field_type.text',
'first_name' => 'anomaly.field_type.text',
'last_name' => 'anomaly.field_type.text',
'name' => 'anomaly.field_type.text',
'description' => 'anomaly.field_type.textarea',
'reset_code' => 'anomaly.field_type.text',
'reset_code_expires_at' => 'anomaly.field_type.datetime',
'activation_code' => 'anomaly.field_type.text',
'activation_code_expires_at' => 'anomaly.field_type.datetime',
'activated' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
],
],
'enabled' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => true,
],
],
'slug' => [
'type' => 'anomaly.field_type.slug',
'config' => [
'slugify' => 'name',
],
],
'roles' => [
'type' => 'anomaly.field_type.multiple',
'config' => [
'related' => RoleModel::class,
],
],
];
}

View File

@ -0,0 +1,62 @@
<?php
use Anomaly\Streams\Platform\Database\Migration\Migration;
/**
* Class AnomalyModuleUsersCreateUsersStream
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <support@pyrocms.com>
* @author Ryan Thompson <ryan@pyrocms.com>
*/
class AnomalyModuleUsersCreateUsersStream extends Migration
{
/**
* The stream definition.
*
* @var string
*/
protected $stream = [
'slug' => 'users',
'title_column' => 'display_name',
'trashable' => true,
];
/**
* The stream assignments.
*
* @var array
*/
protected $assignments = [
'email' => [
'required' => true,
'unique' => true,
],
'username' => [
'required' => true,
'unique' => true,
],
'password' => [
'required' => true,
],
'roles' => [
'required' => true,
],
'display_name' => [
'required' => true,
],
'first_name',
'last_name',
'activated',
'enabled',
'permissions',
'last_login_at',
'remember_token',
'activation_code',
'reset_code',
'last_activity_at',
'ip_address',
];
}

View File

@ -0,0 +1,47 @@
<?php
use Anomaly\Streams\Platform\Database\Migration\Migration;
/**
* Class AnomalyModuleUsersCreateRolesStream
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <support@pyrocms.com>
* @author Ryan Thompson <ryan@pyrocms.com>
*/
class AnomalyModuleUsersCreateRolesStream extends Migration
{
/**
* The stream definition.
*
* @var array
*/
protected $stream = [
'slug' => 'roles',
'title_column' => 'name',
'translatable' => true,
'trashable' => true,
];
/**
* The stream assignments.
*
* @var array
*/
protected $assignments = [
'name' => [
'required' => true,
'translatable' => true,
],
'slug' => [
'required' => true,
'unique' => true,
],
'description' => [
'translatable' => true,
],
'permissions',
];
}

View File

@ -0,0 +1,33 @@
<?php
use Anomaly\Streams\Platform\Database\Migration\Migration;
class AnomalyModuleUsersMakeUsersSearchable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$this->streams()
->findBySlugAndNamespace('users', 'users')
->setAttribute('searchable', true)
->save();
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
$this->streams()
->findBySlugAndNamespace('users', 'users')
->setAttribute('searchable', false)
->save();
}
}

View File

@ -0,0 +1,89 @@
<?php
use Anomaly\UsersModule\User\UserRepository;
use Anomaly\Streams\Platform\Model\EloquentModel;
use Anomaly\UsersModule\User\Contract\UserInterface;
use Anomaly\Streams\Platform\Database\Migration\Migration;
use Anomaly\UsersModule\User\Contract\UserRepositoryInterface;
use Anomaly\Streams\Platform\Entry\Command\AutoloadEntryModels;
/**
* Class AnomalyModuleUsersAddStrIdToUsers
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <support@pyrocms.com>
* @author Ryan Thompson <ryan@pyrocms.com>
*/
class AnomalyModuleUsersAddStrIdToUsers extends Migration
{
/**
* Don't delete the stream.
* Used for reference only.
*
* @var bool
*/
protected $delete = false;
/**
* The addon fields.
*
* @var array
*/
protected $fields = [
'str_id' => 'anomaly.field_type.text',
];
/**
*
* @var array
*/
protected $stream = [
'slug' => 'users',
];
/**
* @var array
*/
protected $assignments = [
'str_id' => [
'required' => true,
],
];
/**
* Run the migrations.
*/
public function up()
{
/**
* Ensure the potentially newly generated
* models are autoloaded so we can use them.
*/
dispatch_sync(new AutoloadEntryModels());
/**
* Load the concrete on purpose.
*
* @var UserRepositoryInterface $users
*/
$users = app(UserRepository::class);
/* @var UserInterface|EloquentModel $user */
foreach ($users->allWithTrashed() as $user) {
if ($user->getStrId()) {
continue;
}
$users->save($user->setRawAttribute('str_id', str_random(24)));
}
$field = $this->fields()->findBySlugAndNamespace('str_id', 'users');
$stream = $this->streams()->findBySlugAndNamespace('users', 'users');
$assignment = $this->assignments()->findByStreamAndField($stream, $field);
$this->assignments()->save($assignment->setAttribute('unique', true));
}
}

View File

@ -0,0 +1,38 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Login Field
|--------------------------------------------------------------------------
|
| Specify whether to use the 'email' or 'username' for logging in.
|
*/
'login' => env('LOGIN', 'email'),
/*
|--------------------------------------------------------------------------
| Activation Mode
|--------------------------------------------------------------------------
|
| How do you want to activate users? Available options are:
|
| 'email' - Send an activation email to the user.
| 'manual' - Require an admin to manually activate the user.
| 'automatic' - Automatically activate the user when they register.
|
*/
'activation_mode' => env('ACTIVATION_MODE', 'email'),
/*
|--------------------------------------------------------------------------
| Permissions
|--------------------------------------------------------------------------
|
| Define additional permissions here.
|
*/
'permissions' => [],
];

View File

@ -0,0 +1,29 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| New Users
|--------------------------------------------------------------------------
|
| Define the emails to send
| new user notifications to.
|
*/
'new_user' => [],
/*
|--------------------------------------------------------------------------
| Pending Users
|--------------------------------------------------------------------------
|
| Define the emails to send
| pending user notifications to.
|
*/
'pending_user' => [],
];

View File

@ -0,0 +1,29 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Minimum Length
|--------------------------------------------------------------------------
|
| Specify the required minimum length for passwords.
|
*/
'minimum_length' => env('PASSWORD_LENGTH', 8),
/*
|--------------------------------------------------------------------------
| Password Requirements
|--------------------------------------------------------------------------
|
| Specify the security requirements for passwords.
|
*/
'requirements' => [
'[0-9]',
'[a-z]',
'[A-Z]',
'[!@#$%^&*()]',
],
];

View File

@ -0,0 +1,23 @@
<?php
return [
'users' => [
'read',
'write',
'write_admins',
'impersonate',
'delete',
'manage_permissions'
],
'roles' => [
'read',
'write',
'delete',
],
'fields' => [
'manage',
],
'settings' => [
'manage',
],
];

View File

@ -0,0 +1,24 @@
<?php
return [
[
'tabs' => [
'security' => [
'title' => 'anomaly.module.users::tab.security',
'fields' => [
'login',
'activation_mode',
'password_length',
'password_requirements',
],
],
'notifications' => [
'title' => 'anomaly.module.users::tab.notifications',
'fields' => [
'new_user_notification',
'pending_user_notification',
],
],
],
],
];

View File

@ -0,0 +1,73 @@
<?php
return [
'login' => [
'required' => true,
'placeholder' => false,
'env' => 'LOGIN',
'bind' => 'anomaly.module.users::config.login',
'type' => 'anomaly.field_type.select',
'config' => [
'default_value' => 'email',
'options' => [
'email' => 'anomaly.module.users::setting.login.option.email',
'username' => 'anomaly.module.users::setting.login.option.username',
],
],
],
'activation_mode' => [
'required' => true,
'placeholder' => false,
'env' => 'ACTIVATION_MODE',
'bind' => 'anomaly.module.users::config.activation_mode',
'type' => 'anomaly.field_type.select',
'config' => [
'default_value' => 'email',
'options' => [
'email' => 'anomaly.module.users::setting.activation_mode.option.email',
'manual' => 'anomaly.module.users::setting.activation_mode.option.manual',
'automatic' => 'anomaly.module.users::setting.activation_mode.option.automatic',
],
],
],
'password_length' => [
'required' => true,
'env' => 'PASSWORD_LENGTH',
'bind' => 'anomaly.module.users::password.minimum_length',
'type' => 'anomaly.field_type.integer',
'config' => [
'default_value' => 8,
'min' => 4,
],
],
'password_requirements' => [
'bind' => 'anomaly.module.users::password.requirements',
'type' => 'anomaly.field_type.checkboxes',
'config' => [
'default_value' => [
'[a-z]',
'[A-Z]',
],
'options' => [
'[0-9]' => 'anomaly.module.users::setting.password_requirements.option.[0-9]',
'[a-z]' => 'anomaly.module.users::setting.password_requirements.option.[a-z]',
'[A-Z]' => 'anomaly.module.users::setting.password_requirements.option.[A-Z]',
'[!@#$%^&*()]' => 'anomaly.module.users::setting.password_requirements.option.[!@#$%^&*()]',
],
],
],
'new_user_notification' => [
'type' => 'anomaly.field_type.tags',
'bind' => 'anomaly.module.users::notifications.new_user',
'config' => [
'filter_tags' => FILTER_VALIDATE_EMAIL,
],
],
'pending_user_notification' => [
'type' => 'anomaly.field_type.tags',
'bind' => 'anomaly.module.users::notifications.pending_user',
'config' => [
'filter_tags' => FILTER_VALIDATE_EMAIL,
],
],
];

View File

@ -0,0 +1,12 @@
<?php
return [
'title' => 'المستخدمين',
'name' => 'وحدة المستخدمين',
'description' => 'إدارة المستخدمين و الأدوار والصلاحيات.',
'section' => [
'users' => 'المستخدمين',
'roles' => 'الأدوار',
'fields' => 'الحقول',
],
];

View File

@ -0,0 +1,6 @@
<?php
return [
'login' => 'تسجيل الدخول',
'permissions' => 'الصلاحيات',
];

View File

@ -0,0 +1,13 @@
<?php
return [
'login' => 'دخول',
'register' => 'تسجيل',
'logout' => 'خروج',
'activate' => 'تفعيل',
'new_user' => 'مستخدم جديد',
'new_role' => 'دور جديد',
'add_field' => 'اضافة حقل',
'permissions' => 'الصلاحيات',
'reset_password' => 'إعادة تعين كلمة المرور',
];

View File

@ -0,0 +1,6 @@
<?php
return [
'reset_password' => 'كلمة المرور لا يمكن إعادة تغيرها.',
'activate_user' => 'حسابك لا يمكن تقعيله.',
];

View File

@ -0,0 +1,86 @@
<?php
return [
'name' => [
'name' => 'الأسم',
'instructions' => [
'roles' => 'حدد اسم مختصر يصف هذا الدور.',
],
],
'description' => [
'name' => 'الوصف',
'instructions' => [
'roles' => 'صف هذا الدور بشكل مخنصر.',
],
],
'first_name' => [
'name' => 'الأسم الأول',
'instructions' => 'حدد اسم المستخدم الأول.',
],
'last_name' => [
'name' => 'اللقب',
'instructions' => 'حدد اسم المستخدم الثاني (الكنية).',
],
'display_name' => [
'name' => 'الأسم المعروض',
'instructions' => 'حدد الأسم الذي يتم عرضه للعامة.',
],
'username' => [
'name' => 'اسم المستخدم',
'instructions' => 'اسم المستخدم يستخدم للتعريف بشكل فريد بالمستخدم وعرض أسمه.',
],
'email' => [
'name' => 'البريد الالكتروني',
'instructions' => 'البريد الالكترني يستخدم لتسجيل الدخول.',
],
'password' => [
'name' => 'كلمة المرور',
'instructions' => 'تحديد كلمة المرور المحمية.',
],
'confirm_password' => [
'name' => 'تأكيد كلمة المرور',
],
'slug' => [
'name' => 'المعرف',
'instructions' => [
'roles' => 'المعرف يستخدم للتعريف بشكل فريد عن هذا الدور.',
],
],
'roles' => [
'name' => 'الأدوار',
'instructions' => 'حد د الأدوار التي ينتمي إليها المستخدم.',
],
'permissions' => [
'name' => 'الصلاحيات',
],
'last_activity_at' => [
'name' => 'أخر نشاط',
],
'activated' => [
'name' => 'مُنشط',
'label' => 'هل هذا المستخدم مُنشط?',
'instructions' => 'المستخدم لا يمكنه تسجيل الدخول حتى يتم تنشيط حسابه.',
],
'enabled' => [
'name' => 'مفعل',
'label' => 'هل هذا المستخدم مفعل?',
'instructions' => 'المستخدم لا يمكنه تسجيل الدخول حتى يتم تفعيل حسابه.',
],
'activation_code' => [
'name' => 'رمز التنشيط',
],
'reset_code' => [
'name' => 'رمز إعادة كلمة المرور',
],
'remember_me' => [
'name' => 'تذكرني',
],
'status' => [
'name' => 'الحالة',
'option' => [
'active' => 'نشط',
'inactive' => 'غير نشط',
'disabled' => 'معطل',
],
],
];

View File

@ -0,0 +1,14 @@
<?php
return [
'logged_in' => 'لقد تم تسجيل دخولك.',
'logged_out' => 'لقد تم تسجيل خروجك.',
'invalid_login' => 'كلمة المرور أو اسم المستخدم غير صحيح.',
'user_already_activated' => 'لقد تم تنشيط حسابك سابقا.',
'choose_field_type' => 'ما هو نوع الحقل الذي بريد اسخدامه?',
'account_activated' => 'لقد تم تنشيط حسابك.',
'pending_email_activation' => 'الرجاء تأكيد بريدك الالكتروني ليتم تنشيط حسابك.',
'invalid_email' => 'الحساب لهذا البريد الاكنروني المزود به غير موجود.',
'pending_admin_activation' => 'حسابك ينتظر التنشيط من الادارة.',
'confirm_reset_password' => 'تفحص بريدك الالكتروني لاتمام اعادة تعين كلمة المرور.',
];

View File

@ -0,0 +1,28 @@
<?php
return [
'activate_your_account' => [
'subject' => 'نشط حسابك',
'greeting' => 'أهلاً وسهلا :display_name!',
'instructions' => 'شكرا لتسجيلك! الرجاء نشط حسابك بالنقرعلى الزر في الأسفل.',
'button' => 'تنشيط الحساب',
],
'user_pending_activation' => [
'subject' => 'مستخدم ينتظر التنشيط',
'instructions' => ':username لقد تم تسجيله وينتظر التنشيط , لتنشيط حسابه انقر على الزر في الأسفل.',
'button' => 'تنشيط الحساب',
],
'reset_your_password' => [
'subject' => 'إعادة تعين كلمة المرور',
'greeting' => 'أهلاً وسهلاٌ :display_name!',
'notice' => 'لقد تم طلب إعادة تعين كلمة المرور لحسابك.',
'warning' => 'إذا لم تقم بهذا الطلب بإمكان تجاهل هذا البريد الالكتروني بشكل آمان.',
'instructions' => 'إذا كنت حقاً تريد إعادة تعين كلمة المرور لحسابك انقر على الزر الموجد في الأسفل.',
'button' => 'إعادة تعين كلمة المرور',
],
'user_has_registered' => [
'subject' => 'لقد تم تسجيل المستخدم',
'instructions' => ':username لقد تم تسجيله ! لعرض صفحته الشخصية انقر على الزر الموجود في الأسفل.',
'button' => 'عرض الصفحة الشخصية',
],
];

View File

@ -0,0 +1,32 @@
<?php
return [
'users' => [
'name' => 'المستخدمين',
'option' => [
'read' => 'هل يمكن الوصول لقسم المستخدمين.',
'write' => 'هل يمكن إنشاء وتعديل المستخدمين.',
'delete' => 'هل يمكن حذف المستخدمين.',
],
],
'roles' => [
'name' => 'الأدوار',
'option' => [
'read' => 'هل يمكن الوصول لقسم الأدوار.',
'write' => 'هل يمكن إنشاء وتعديل الأدوار.',
'delete' => 'هل يمكن حذف الأدوار.',
],
],
'fields' => [
'name' => 'الحقول',
'option' => [
'manage' => 'هل يمكن أدارة الحقول المخصصة.',
],
],
'settings' => [
'name' => 'الإعدادت',
'option' => [
'manage' => 'هل يمكن أدارة إعدادت الإضافات.',
],
],
];

View File

@ -0,0 +1,21 @@
<?php
return [
'login' => [
'label' => 'حقل الدخول',
'instructions' => 'ما هو الحقل الذي تريد استخدامه لتسجيل الدخول?',
'option' => [
'email' => 'البريد الالكتروني',
'username' => 'اسم المستخدم',
],
],
'activation_mode' => [
'label' => 'وضع التفعيل',
'instructions' => 'كيف يمكن للمستخدمين تنشيط حسابهم بعد التسجيل?',
'option' => [
'email' => 'ارسال رمز التفعيل على البريد الاللكتروني للمستخدمين.',
'manual' => 'يتطلب من المدير تنشيط حساب المستخدم بشكل يدوي.',
'automatic' => 'تنشيط حساب المستخدم بشكل تلقائي بعد التسجيل.',
],
],
];

View File

@ -0,0 +1,10 @@
<?php
return [
'users' => [
'name' => 'المستخدمين',
],
'roles' => [
'name' => 'الأدوار',
],
];

View File

@ -0,0 +1,7 @@
<?php
return [
'reset_password' => 'لقد تم إعادة تعين كلمة المرور.',
'activate_user' => 'لقد تم تنشيط حسابك.',
'user_registered' => 'لقد تم تسجيل حسابك.',
];

View File

@ -0,0 +1,6 @@
<?php
return [
'general' => 'عام',
'profile' => 'الصقحة الشخصية',
];

View File

@ -0,0 +1,7 @@
<?php
return [
'online' => 'متصل',
'inactive' => 'غير منشط',
'enabled' => 'مٌفعل',
];

View File

@ -0,0 +1,6 @@
<?php
return [
'modify_admin_user' => 'حسابات المستخدمين الإداريين لا يمكن تعديلها.',
'modify_admin_role' => 'دور المدير لا يمكن تعديله.',
];

View File

@ -0,0 +1,13 @@
<?php
return [
'title' => 'Benutzer',
'name' => 'Benutzer Module',
'description' => 'Verwaltung von Benutzern, Rollen und Berechtigungen.',
'section' => [
'users' => 'Benutzer',
'roles' => 'Rollen',
'fields' => 'Felder',
'settings' => 'Einstellungen',
],
];

View File

@ -0,0 +1,5 @@
<?php
return [
'permissions' => 'Berechtigungen',
];

View File

@ -0,0 +1,17 @@
<?php
return [
'login' => 'Anmelden',
'block' => 'Blockieren',
'logout' => 'Abmelden',
'unblock' => 'Blockierung aufheben',
'suspend' => 'Suspendieren',
'activate' => 'Aktivieren',
'new_user' => 'Neuer Benutzer',
'new_role' => 'Neue Rolle',
'reinstate' => 'Suspendierung aufheben',
'add_field' => 'Feld hinzufügen',
'deactivate' => 'Deaktivieren',
'permissions' => 'Berechtigungen',
'reset_password' => 'Passwort zurücksetzen',
];

View File

@ -0,0 +1,6 @@
<?php
return [
'suspend_users' => 'Sind Sie sicher, dass Sie die gewählten Benutzer suspendieren möchten?',
'reinstate_users' => 'Sind Sie sicher, dass Sie die Suspendierung der gewählten Benutzer aufheben möchten?',
];

View File

@ -0,0 +1,9 @@
<?php
return [
'reset_password' => 'Ihr Passwort konnte nicht zurückgesetzt werden.',
'activate_user' => 'Ihr konnte konnte nicht aktiviert werden.',
'suspend_users' => ':count Benutzer konnte(n) nicht suspendiert werden.',
'activate_users' => ':count Benutzer konnte(n) nicht aktiviert werden.',
'reset_passwords' => ':count &raquo;Passwort zurücksetzen&laquo; Nachricht(en) konnte(n) nicht gesendet werden.',
];

View File

@ -0,0 +1,79 @@
<?php
return [
'name' => [
'name' => 'Name',
'instructions' => 'Was ist der Name dieser Rolle?',
'placeholder' => 'Editor',
],
'first_name' => [
'name' => 'Vorname',
'instructions' => 'Wie lautet der Vorname des Benutzers?',
'placeholder' => 'Hans',
],
'last_name' => [
'name' => 'Nachname',
'instructions' => 'Wie lautet der Nachname des Benutzers?',
'placeholder' => 'Müller',
],
'display_name' => [
'name' => 'Anzeigename',
'instructions' => 'Wie lautet der öffentliche angezeigte Name dieses Benutzers?',
'placeholder' => 'Herr Hans Müller',
],
'username' => [
'name' => 'Benutzername',
'instructions' => 'Wie lautet der Benutzername? Der Benutzername darf über alle Benutzer nur einmal vorkommen.',
'placeholder' => 'hansmueller1',
],
'email' => [
'name' => 'E-Mail',
'instructions' => 'Wie lautet die E-Mail-Adresse des Benutzers? Die E-Mail-Adresse darf über alle Benutzer nur einmal vorkommen.',
'instructions_alt' => 'Geben Sie die E-Mail-Adresse dieses Benutzerkontos an.',
'placeholder' => 'beispiel@domain.de',
],
'password' => [
'name' => 'Passwort',
'instructions' => 'Geben Sie ein sicheres Passwort für diesen Benutzer ein.',
'instructions_alt' => 'Geben Sie ein neues, sicheres Passwort für diesen Benutzer ein.',
],
'password_confirmation' => [
'name' => 'Passwort Bestätigung',
'instructions' => 'Bestätigen Sie das neue Passwort.',
'instructions_alt' => 'Bestätigen Sie das neue Passwort.',
],
'slug' => [
'name' => 'Slug',
'instructions' => 'Geben Sie den &laquo;Slug&raquo; dieser Rolle ein. Der Slug wird hauptsächlich hinter den Kulissen verwendet, und darf über alle Rollen nur einmal vorkommen.',
'placeholder' => 'editor',
],
'roles' => [
'name' => 'Rollen',
'count' => ':count Rolle(n)',
'instructions' => 'Wählen Sie die Rolle(n) für diesen Benutzer aus.',
],
'permissions' => [
'name' => 'Berechtigungen',
'count' => ':count Berechtigung(en)',
],
'last_activity_at' => [
'name' => 'Letzte Aktivität',
],
'status' => [
'name' => 'Status',
'active' => 'Aktiv',
'inactive' => 'Inaktiv',
'enabled' => 'Suspendiert',
],
'reset_code' => [
'name' => 'Code für die Zurücksetzung',
'instructions' => 'Geben Sie den Code für die Zurücksetzung ein, der Ihnen zugesendet wurde.',
],
'activation_code' => [
'name' => 'Aktivierungscode',
'instructions' => 'Geben Sie den Aktivierungscode ein, der Ihnen zugesendet wurde.',
],
'remember_me' => [
'name' => 'Angemeldet bleiben',
],
];

View File

@ -0,0 +1,20 @@
<?php
return [
'forgot_password' => 'Passwort vergessen?',
'logged_in' => 'Sie sind jetzt eingeloggt',
'logged_out' => 'Sie sind jetzt ausgeloggt',
'invalid_login' => 'Falscher Login oder Passwort',
'user_already_activated' => 'Ihr Account ist schon aktiviert.',
'choose_field_type' => 'Welches Feld wollen Sie verwenden.',
'account_activated' => 'Ihr Account wurde aktiviert.',
'activate_success' => ':count Benutzer wurde(n) erfolgreich aktiviert.',
'pending_email_activation' => 'Bitte bestätigen Sie Ihre E-Mail um Ihr Konto zu aktivieren.',
'invalid_email' => 'Für die angegebene E-Mail konnte kein Konoto gefunden werden.',
'pending_admin_activation' => 'Ihr Konto muss noch von einem Administrator aktiviert werden.',
'confirm_reset_password' => 'Bitte prüfen Sie Ihre E-Mail, um Ihr Passwort zurückzusetzen.',
'confirm_reset_user' => 'Sind Sie sicher, dass Sie das Passwort für diesen Nutzer zurücksetzen wollen?<br><br>Das derzeitige Passwort wird dadurch ungültig.',
'impersonate' => 'Sie loggen sich als ":display_name" ein',
'impersonating' => 'Sie sind jetzt als ":username" eingeloggt',
'invalid_password' => 'Das eingegebene Passwort ist inkorrekt.',
];

View File

@ -0,0 +1,21 @@
<?php
return [
'default' => [
'read' => 'Kann Artikel lesen?',
'delete' => 'Kann Einträge löschen?',
'fields' => 'Kann benutzerdefinierte Felder bearbeiten?',
'write' => 'Kann Einträge erstellen und bearbeiten?',
],
'general' => [
'title' => 'Allgemein',
'control_panel' => 'Kann auf das &laquo;Control Panel&raquo; zugreifen?',
'control_panel_instructions' => 'Diese Berechtigung ist nötig, um auf jeglichen Teil des &laquo;Control Panels&raquo; zugreifen zu können.',
],
'users' => [
'title' => 'Benutzer',
],
'roles' => [
'title' => 'Rollen',
],
];

View File

@ -0,0 +1,43 @@
<?php
return [
'login' => [
'label' => 'Login Feld',
'instructions' => 'Welches Feld soll für den Login verwendet werden?',
'option' => [
'email' => 'E-Mail',
'username' => 'Benutzername',
],
],
'activation_mode' => [
'label' => 'Aktivierungsmodus',
'instructions' => 'Wie sollen Benutzer aktiviert werden nachdem Sie sich registriert haben?',
'option' => [
'email' => 'Schick eine Aktivierungsmail an den Benutzer.',
'manual' => 'Ein Administrator muss den Benutzer manuell aktivieren.',
'automatic' => 'Aktiviere Benutzer automatisch nachdem Sie sich registriert haben.',
],
],
'password_length' => [
'label' => 'Passwortlänge',
'instructions' => 'Geben sie die Minimallänge für das Passwort an.',
],
'password_requirements' => [
'label' => 'Passwortanforderungen',
'instructions' => 'Geben Sie die Anforderungen für das Passwort an.',
'option' => [
'[0-9]' => 'Das Passwort muss mindestens eine Zahl enthalten.',
'[a-z]' => 'Das Passwort muss mindestens einen Kleinbuchstaben enthalten.',
'[A-Z]' => 'Das Passwort muss mindestens einen Großbuchstaben enthalten.',
'[!@#$%^&*()]' => 'Das Passwort muss mindestens ein Sonderzeichen enthalten.',
],
],
'new_user_notification' => [
'name' => 'Benachrichtigungen für neue Benutzer.',
'instructions' => 'Wer soll über neue Benutzer benachrichtigt werden?',
],
'pending_user_notification' => [
'name' => 'Ausstehende Benutzer Benachrichtigungen',
'instructions' => 'Wer soll über Benutzer benachrichtigt werden, die eine Aktivierung benötigen?',
],
];

View File

@ -0,0 +1,10 @@
<?php
return [
'users' => [
'name' => 'Benutzer',
],
'roles' => [
'name' => 'Rollen',
],
];

View File

@ -0,0 +1,10 @@
<?php
return [
'reset_password' => 'Ihr Passwort wurde zurückgesetzt.',
'activate_user' => 'Ihr Konto wurde aktiviert.',
'activate_users' => ':count Benutzer wurde(n) erfolgreich aktiviert.',
'suspend_users' => ':count Benutzer wurde(n) erfolgreich suspendiert.',
'reinstate_users' => 'Die Suspendierung von :count Benutzer(n) wurde erfolgreich aufgehoben.',
'reset_passwords' => ':count &laquo;Passwort zurücksetzen&raquo; wurden erfolgreich versendet.',
];

View File

@ -0,0 +1,6 @@
<?php
return [
'general' => 'Allgemein',
'profile' => 'Profil',
];

View File

@ -0,0 +1,7 @@
<?php
return [
'online' => 'Online',
'inactive' => 'Inaktiv',
'enabled' => 'Suspendiert',
];

View File

@ -0,0 +1,6 @@
<?php
return [
'modify_admin_user' => 'Administrator Benutzer können nicht bearbeitet werden.',
'modify_admin_role' => 'Die Administratorrolle kann nicht bearbeitet werden.',
];

View File

@ -0,0 +1,12 @@
<?php
return [
'title' => 'Users',
'name' => 'Users Module',
'description' => 'Manage users, roles, and permissions.',
'section' => [
'users' => 'Users',
'roles' => 'Roles',
'fields' => 'Fields',
],
];

View File

@ -0,0 +1,8 @@
<?php
return [
'login' => 'Login',
'register' => 'Register',
'permissions' => 'Permissions',
'reset_password' => 'Reset Password',
];

View File

@ -0,0 +1,15 @@
<?php
return [
'login' => 'Login',
'register' => 'Register',
'logout' => 'Logout',
'activate' => 'Activate',
'new_user' => 'New User',
'new_role' => 'New Role',
'add_field' => 'Add Field',
'permissions' => 'Permissions',
'view_profile' => 'View Profile',
'login_as_user' => 'Login as User',
'reset_password' => 'Reset Password',
];

View File

@ -0,0 +1,9 @@
<?php
return [
'reset_password' => 'Your password could not be reset.',
'activate_user' => 'Your account could not be activated.',
'modify_admins' => 'You are not authorized to create or edit admin users.',
'impersonate_admins' => 'Admin users can not be impersonated.',
'reset_admins' => 'Admin password resets are not allowed.',
];

View File

@ -0,0 +1,88 @@
<?php
return [
'name' => [
'name' => 'Name',
'instructions' => [
'roles' => 'Specify a short descriptive name for this role.',
],
],
'description' => [
'name' => 'Description',
'instructions' => [
'roles' => 'Briefly describe this role.',
],
],
'first_name' => [
'name' => 'First Name',
'instructions' => 'Specify the user\'s real first name.',
],
'last_name' => [
'name' => 'Last Name',
'instructions' => 'Specify the user\'s real last name.',
],
'display_name' => [
'name' => 'Display Name',
'instructions' => 'Specify the user\'s publicly displayable name.',
],
'username' => [
'name' => 'Username',
'instructions' => 'The username is used for uniquely identifying and displaying this user.',
],
'email' => [
'name' => 'Email',
'instructions' => 'The email is used for logging in.',
],
'password' => [
'name' => 'Password',
'instructions' => 'Specify the user\'s secure password.',
'impersonate' => 'Please confirm your current password to continue.',
],
'confirm_password' => [
'name' => 'Confirm Password',
],
'slug' => [
'name' => 'Slug',
'instructions' => [
'roles' => 'The slug is used in uniquely identifying this role.',
],
],
'roles' => [
'name' => 'Roles',
'instructions' => 'Specify which roles the user belongs to.',
],
'permissions' => [
'name' => 'Permissions',
],
'last_activity_at' => [
'name' => 'Last Activity',
],
'activated' => [
'name' => 'Activated',
'label' => 'Is this user activated?',
'instructions' => 'The user will not be able to login unless activated.',
],
'enabled' => [
'name' => 'Enabled',
'label' => 'Is this user enabled?',
'instructions' => 'The user will not be able to login or activate if disabled.',
],
'activation_code' => [
'name' => 'Activation Code',
],
'reset_code' => [
'name' => 'Reset Code',
],
'remember_me' => [
'name' => 'Remember me',
],
'status' => [
'name' => 'Status',
'option' => [
'active' => 'Active',
'inactive' => 'Inactive',
'disabled' => 'Disabled',
],
],
];

View File

@ -0,0 +1,20 @@
<?php
return [
'forgot_password' => 'Forgot your password?',
'logged_in' => 'You are now logged in.',
'logged_out' => 'You are now logged out.',
'invalid_login' => 'Incorrect login or password.',
'user_already_activated' => 'Your account is already activated.',
'choose_field_type' => 'What field type would you like to use?',
'account_activated' => 'Your account has been activated.',
'activate_success' => ':count users(s) were activated successfully.',
'pending_email_activation' => 'Please confirm your email to activate your account.',
'invalid_email' => 'An account with the provided email could not be found.',
'pending_admin_activation' => 'Your account is pending activation from an administrator.',
'confirm_reset_password' => 'Please check your email to finish resetting your password.',
'confirm_reset_user' => 'Are you sure you want to initiate a password reset for this user?<br><br>Their current password will be invalidated.',
'impersonate' => 'You are about to login as ":display_name"',
'impersonating' => 'You are now logged in as ":username"',
'invalid_password' => 'The password you entered is incorrect.',
];

View File

@ -0,0 +1,42 @@
<?php
return [
'activate_your_account' => [
'subject' => 'Activate Your Account',
'greeting' => 'Hello :display_name!',
'instructions' => 'Thank you for registering! Please activate your account by clicking the button below.',
'button' => 'Activate Account',
],
'user_pending_activation' => [
'subject' => 'User Pending Activation',
'instructions' => ':username has just registered and is pending activation. To activate their account click the button below.',
'button' => 'Activate Account',
],
'reset_your_password' => [
'subject' => 'Reset Your Password',
'greeting' => 'Hello :display_name!',
'notice' => 'A password reset has been requested for your account.',
'warning' => 'If you did not make this request, you can safely ignore this email.',
'instructions' => 'If you would actually like to reset your password click the button below.',
'button' => 'Reset Password',
],
'password_invalidated' => [
'subject' => 'Reset Your Password',
'greeting' => 'Hello :display_name!',
'notice' => 'A password reset has been requested for your account by an administrator.',
'warning' => 'Your current password is no longer valid.',
'instructions' => 'Please click the button below to reset your password.',
'button' => 'Reset Password',
],
'user_has_registered' => [
'subject' => 'User Has Registered',
'instructions' => ':username has just registered! To view their profile click the button below.',
'button' => 'View Profile',
],
'user_has_been_activated' => [
'subject' => 'Account Activated',
'greeting' => 'Hello :display_name!',
'instructions' => 'Your account has been activated.',
'button' => 'Login',
],
];

View File

@ -0,0 +1,36 @@
<?php
return [
'users' => [
'name' => 'Users',
'option' => [
'read' => 'Can access users section.',
'write' => 'Can create and edit users.',
'write_admins' => 'Can create and edit admins.',
'impersonate' => 'Can impersonate other users.',
'reset' => 'Can reset users.',
'delete' => 'Can delete users.',
'manage_permissions' => 'Can manage a user\'s permissions.',
],
],
'roles' => [
'name' => 'Roles',
'option' => [
'read' => 'Can access roles section.',
'write' => 'Can create and edit roles.',
'delete' => 'Can delete roles.',
],
],
'fields' => [
'name' => 'Fields',
'option' => [
'manage' => 'Can manage custom fields.',
],
],
'settings' => [
'name' => 'Settings',
'option' => [
'manage' => 'Can manage addon settings.',
],
],
];

View File

@ -0,0 +1,43 @@
<?php
return [
'login' => [
'label' => 'Login Field',
'instructions' => 'Which field should be used for logging in?',
'option' => [
'email' => 'Email',
'username' => 'Username',
],
],
'activation_mode' => [
'label' => 'Activation Mode',
'instructions' => 'How should users be activated after they register?',
'option' => [
'email' => 'Send an activation email to the user.',
'manual' => 'Require an administrator to manually activate the user.',
'automatic' => 'Automatically activate the user after they register.',
],
],
'password_length' => [
'label' => 'Password Length',
'instructions' => 'Specify the minimum length for passwords.',
],
'password_requirements' => [
'label' => 'Password Requirements',
'instructions' => 'Specify the character requirements for passwords.',
'option' => [
'[0-9]' => 'The password must contain at least one integer.',
'[a-z]' => 'The password must contain at least one lowercase letter.',
'[A-Z]' => 'The password must contain at least one uppercase letter.',
'[!@#$%^&*()]' => 'The password must contain at least one special character.',
],
],
'new_user_notification' => [
'name' => 'New User Notification',
'instructions' => 'Who should be notified of new users?',
],
'pending_user_notification' => [
'name' => 'Pending User Notification',
'instructions' => 'Who should be notified of users requiring activation?',
],
];

View File

@ -0,0 +1,10 @@
<?php
return [
'users' => [
'name' => 'Users',
],
'roles' => [
'name' => 'Roles',
],
];

View File

@ -0,0 +1,8 @@
<?php
return [
'reset_password' => 'Your password has been reset.',
'activate_user' => 'Your account has been activated.',
'user_registered' => 'Your account has been registered.',
'reset_user' => 'Password reset initiated.',
];

View File

@ -0,0 +1,9 @@
<?php
return [
'general' => 'General',
'account' => 'Account',
'profile' => 'Profile',
'security' => 'Security',
'notifications' => 'Notifications',
];

View File

@ -0,0 +1,8 @@
<?php
return [
'online' => 'Online',
'enabled' => 'Enabled',
'pending' => 'Pending',
'inactive' => 'Inactive',
];

View File

@ -0,0 +1,5 @@
<?php
return [
'modify_admin_permissions' => 'Admin permissions can not be modified.',
];

View File

@ -0,0 +1,12 @@
<?php
return [
'name' => 'Usuarios',
'description' => 'Administrador de usuarios y Permisos.',
'section' => [
'users' => 'Usuarios',
'roles' => 'Roles',
'fields' => 'Campos',
'settings' => 'Configuraciones',
],
];

View File

@ -0,0 +1,13 @@
<?php
return [
'login' => 'Ingresar',
'logout' => 'Cerrar sesión',
'block' => 'Bloquear',
'unblock' => 'Desbloquear',
'activate' => 'Activar',
'deactivate' => 'Desactivar',
'new_user' => 'Nuevo Usuario',
'new_role' => 'Nuevo rol',
'new_field' => 'Nuevo Campo',
];

View File

@ -0,0 +1,64 @@
<?php
return [
'name' => [
'name' => 'Nombre',
'instructions' => 'Cual es el nombre del rol?',
'placeholder' => 'Editor',
],
'first_name' => [
'name' => 'Nombre',
'instructions' => 'Cual es el nombre del usuario?',
'placeholder' => 'John',
],
'last_name' => [
'name' => 'Apellido',
'instructions' => 'Cual es el apellido del usuario?',
'placeholder' => 'Doe',
],
'display_name' => [
'name' => 'Nombre para mostrar',
'instructions' => 'Cual es el nombre para mostrar del usuario? si no se coloca se usara el nombre del usuario.',
'placeholder' => 'Mr. John Doe',
],
'username' => [
'name' => 'Nombre de usuario.',
'instructions' => 'Cual es el nombre de usuario? debe ser único entre todos los usuarios.',
'placeholder' => 'johndoe1',
],
'email' => [
'name' => 'Correo Electrónico',
'instructions' => 'Cual es el correo electrónico del usuario? debe ser único entre todos los usuarios.',
'placeholder' => 'example@domain.com',
],
'password' => [
'name' => 'Contraseña',
'instructions' => 'Ingrese una contraseña para el usuario.',
],
'slug' => [
'name' => 'Slug',
'instructions' => 'Ingrese el Slug del role, internamente se utiliza y debe ser único entre todos los roles.',
'placeholder' => 'editor',
],
'roles' => [
'name' => 'Roles',
'count' => ':count rol(s)',
'instructions' => 'Escoja los roles para asignarle al usuario.',
],
'permissions' => [
'name' => 'Permisos',
'count' => ':count permiso(s)',
],
'activated' => [
'name' => 'Activado',
'activated' => 'Activado',
'not_activated' => 'No activado',
],
'blocked' => [
'name' => 'Bloqueado',
'blocked' => 'Bloqueado',
],
'website' => [
'name' => 'Website',
],
];

View File

@ -0,0 +1,8 @@
<?php
return [
'tab' => [
'general' => 'General',
'profile_fields' => 'Campos del perfil',
],
];

View File

@ -0,0 +1,5 @@
<?php
return [
'remember_me' => 'Recordarme',
];

View File

@ -0,0 +1,10 @@
<?php
return [
'edit_admin_error' => 'El administrador no se puede editar.',
'block_users_success' => ':count usuario(s) se han bloqueado.',
'unblock_users_success' => ':count usuario(s) se han desbloqueado.',
'activate_users_success' => ':count usuario(s) fueron activados.',
'save_user_permissions_success' => 'Los permisos de usuario para ":username" se han guardado correctamente.',
'save_role_permissions_success' => 'Los permisos del rol ":slug" se han guardado correctamente.',
];

View File

@ -0,0 +1,8 @@
<?php
return [
'edit_user_permissions' => 'Editar los permisos para ":username" <<a href="mailto::email">:email</a>>.',
'edit_user_permissions_description' => 'Los permisos agragados en esta ventana solo <em>solo se agregan</em> a los permisos agregador al usuario por los roles a los que pertenece. El usuario <strong>:username</strong> tiene los siguientes roles: <strong>:roles</strong>',
'edit_role_permissions' => 'Editar permisos para el role ":slug".',
'edit_role_permissions_description' => 'Los permisos agragados en esta ventana solo se asignarán al role ":slug". Los permisos especificos de usuarios se pueden agregar a los presentes en esta ventana.',
];

View File

@ -0,0 +1,20 @@
<?php
return [
'create' => 'Crear',
'read' => 'Leer',
'edit' => 'Editar',
'delete' => 'Eliminar',
'settings' => 'Configuración del módulo',
'users' => [
'label' => 'Administración de usuarios',
'permissions' => 'Permisos',
'activate' => 'Activar',
'unblock' => 'Desbloquear',
'block' => 'Bloquear',
],
'roles' => [
'label' => 'Administración de roles',
'permissions' => 'Permisos',
],
];

View File

@ -0,0 +1,28 @@
<?php
return [
'allow_registration' => [
'label' => 'Permitir registro.',
'instructions' => 'Permitir que los usuarios se registren en el sitio web?',
'text' => 'Si, Permitir que se registren usuarios',
],
'activation_mode' => [
'label' => 'Modo de activación',
'instructions' => 'Como se deben activar los usuarios despues del registro?',
'option' => [
'manual' => 'El administrador los activa manualmente.',
'email' => 'Enviar email de activación al usuario.',
'automatic' => 'Activar el usuario automaticamente.',
],
],
'profile_visibility' => [
'label' => 'Visualización del perfil',
'instructions' => 'Especificar quien puede ver el perfil del usuario en el sitio público.',
'option' => [
'everyone' => 'Cualquiera puede ver el perfil.',
'owner' => 'Solo el dueño del perfil puede verlo.',
'disabled' => 'Desabilitar esta funcionalidad.',
'users' => 'Cualquier usuario autenticado puede ver el perfil de otro.',
],
],
];

View File

@ -0,0 +1,10 @@
<?php
return [
'users' => [
'name' => 'Usuarios',
],
'roles' => [
'name' => 'Roles',
],
];

View File

@ -0,0 +1,7 @@
<?php
return [
'status' => 'Estado',
'blocked' => 'Bloqueado',
'pending_activation' => 'Pendiente de activación',
];

View File

@ -0,0 +1,12 @@
<?php
return [
'title' => 'Utilisateurs',
'name' => 'Module Utilisateurs',
'description' => 'Gérez les utilisateurs, les rôles et les permissions.',
'section' => [
'users' => 'Utilisateurs',
'roles' => 'Rôles',
'fields' => 'Champs',
],
];

View File

@ -0,0 +1,6 @@
<?php
return [
'login' => 'Connexion',
'permissions' => 'Permissions',
];

View File

@ -0,0 +1,13 @@
<?php
return [
'login' => 'Connexion',
'register' => 'Inscription',
'logout' => 'Déconnexion',
'activate' => 'Activer',
'new_user' => 'Nouvel utilisateur',
'new_role' => 'Nouveau rôle',
'add_field' => 'Ajouter champs',
'permissions' => 'Permissions',
'reset_password' => 'Réinitialiser mot de passe',
];

View File

@ -0,0 +1,6 @@
<?php
return [
'reset_password' => 'Votre mot de passe ne peut pas être réinitialisé.',
'activate_user' => 'Votre compte ne peut pas être activé.',
];

View File

@ -0,0 +1,83 @@
<?php
return [
'name' => [
'name' => 'Nom',
'instructions' => [
'roles' => 'Choisissez un nom pour ce rôle.',
],
],
'description' => [
'name' => 'Description',
'instructions' => [
'roles' => 'Décrivez ce rôle.',
],
],
'first_name' => [
'name' => 'Prénom',
'instructions' => 'Entrez le prénom de l\'utilisateur.',
],
'last_name' => [
'name' => 'Nom',
'instructions' => 'Entrez le nom de l\'utilisateur.',
],
'display_name' => [
'name' => 'Nom affiché',
'instructions' => 'Entrez le nom publiquement affiché de l\'utilisateur.',
],
'username' => [
'name' => 'Nom d\'utilisateur',
'instructions' => 'Le nom d\'utilisateur est utilisé pour identifier de manière unique l\'utilisateur.',
],
'email' => [
'name' => 'Email',
'instructions' => 'Email de l\'utilisateur. Utilisé pour se connecter.',
],
'password' => [
'name' => 'Mot de passe',
'instructions' => 'Choisissez un mot de passe sécurisé pour l\'utilisateur.',
],
'confirm_password' => [
'name' => 'Confirmer mot de passe',
],
'slug' => [
'name' => 'Slug',
'instructions' => [
'roles' => 'Le slug est utilisé pour identifier de manière unique le rôle.',
],
],
'roles' => [
'name' => 'Rôles',
'instructions' => 'Choisissez quel rôle à l\'utilisateur.',
],
'permissions' => [
'name' => 'Permissions',
],
'last_activity_at' => [
'name' => 'Dernière activité',
],
'activated' => [
'name' => 'Actif',
'label' => 'Est-ce que l\'utilisateur est actif ?',
'instructions' => 'L\'utilisateur ne pourra pas se connecter tant qu\'il n\'est pas actif.',
],
'enabled' => [
'name' => 'Activé',
'label' => 'Est-ce que l\'utilisateur est activé ?',
'instructions' => 'L\'utilisateur ne pourra pas se connecter ni même activer son compte tant qu\'il n\'est pas activé.',
],
'activation_code' => [
'name' => 'Code d\'activation',
],
'remember_me' => [
'name' => 'Se souvenir de moi',
],
'status' => [
'name' => 'Statut',
'option' => [
'active' => 'Actif',
'inactive' => 'Inactif',
'disabled' => 'Désactivé',
],
],
];

View File

@ -0,0 +1,20 @@
<?php
return [
'forgot_password' => 'Mot de passe oublié ?',
'logged_in' => 'Vous êtes maintenant connecté.',
'logged_out' => 'Vous êtes maintenant déconnecté.',
'invalid_login' => 'Email ou mot de passe incorrect.',
'user_already_activated' => 'Votre compte est déjà activé.',
'choose_field_type' => 'Quel champs souhaitez-vous utiliser ?',
'account_activated' => 'Votre compte a été activé.',
'activate_success' => ':count utilisateur(s) ont été activé avec succès.',
'pending_email_activation' => 'Merci de confirmer votre email pour activer votre compte.',
'invalid_email' => 'Aucun compte ne correspond à l\'email fourni.',
'pending_admin_activation' => 'Votre compte est en attente de validation par un administrateur.',
'confirm_reset_password' => 'Merci de vérifier vos emails pour changer votre mot de passe.',
'confirm_reset_user' => 'Êtes vous sure de vouloir réinitialiser le mot de passe de cet utilisateur ?<br><br>Son mot de passe actuel deviendra invalide.',
'impersonate' => 'Vous êtes sur le pont de vous connecter en tant que ":display_name"',
'impersonating' => 'Vous êtes maintenant connecté en tant que ":username"',
'invalid_password' => 'Le mot de passe saisi est incorrecte.',
];

View File

@ -0,0 +1,42 @@
<?php
return [
'activate_your_account' => [
'subject' => 'Activer votre compte',
'greeting' => 'Bonjour :display_name !',
'instructions' => 'Merci de vous être enregistré ! Pour activer votre compte, merci de cliquer sur le bouton ci-dessous.',
'button' => 'Activer le compte',
],
'user_pending_activation' => [
'subject' => 'Activation d\'un utilisateur en attente',
'instructions' => ':username vient juste de s\'enregistrer et est en attente d\'activation. Pour activer son compte, cliquer sur le bouton ci-dessous.',
'button' => 'Activer le compte',
],
'reset_your_password' => [
'subject' => 'Réinitialiser votre mot de passe',
'greeting' => 'Bonjour :display_name !',
'notice' => 'Une réinitialisation du mot de passe a été demandé sur votre compte.',
'warning' => 'Si vous n\'en êtes pas à l\'origine, vous pouvez ignorer cet email.',
'instructions' => 'Si vous souhaitez réinitialiser votre mot de passe, cliquer sur le bouton ci-dessous.',
'button' => 'Réinitialiser le mot de passe',
],
'password_invalidated' => [
'subject' => 'Réinitialiser votre mot de passe',
'greeting' => 'Bonjour :display_name !',
'notice' => 'Une réinitialisation du mot de passe a été demandé par un administrateur.',
'warning' => 'Votre mot de passe actuel n\'est plus valide.',
'instructions' => 'Pour réinitialiser votre mot de passe, merci de cliquer sur le bouton ci-dessous.',
'button' => 'Réinitialiser le mot de passe',
],
'user_has_registered' => [
'subject' => 'User Has Registered',
'instructions' => ':username vient de s\'enregistrer ! Pour voir son profil cliquer sur le bouton ci-dessous.',
'button' => 'Voir le profil',
],
'user_has_been_activated' => [
'subject' => 'Compte activé',
'greeting' => 'Bonjour :display_name !',
'instructions' => 'Votre compte vient d\'être activé.',
'button' => 'Se connecter',
],
];

View File

@ -0,0 +1,32 @@
<?php
return [
'users' => [
'name' => 'Utilisateurs',
'option' => [
'read' => 'Peut accèder aux Utilisateurs ?',
'write' => 'Peut ajouter et modifier les utilisateurs ?',
'delete' => 'Peut supprimer les utilisateurs ?',
],
],
'roles' => [
'name' => 'Rôles',
'option' => [
'read' => 'Peut accèder aux Rôles ?',
'write' => 'Peut ajouter et modifier les rôles ?',
'delete' => 'Peut supprimer les rôles ?',
],
],
'fields' => [
'name' => 'Champs',
'option' => [
'manage' => 'Peut gérer les champs personnalisés ?',
],
],
'settings' => [
'name' => 'Paramètres',
'option' => [
'manage' => 'Peut gérer les paramètres du module ?',
],
],
];

View File

@ -0,0 +1,43 @@
<?php
return [
'login' => [
'label' => 'Champ d\'identification',
'instructions' => 'Quel champ doit être utilisé pour se connecter ?',
'option' => [
'email' => 'Email',
'username' => 'Nom d\'utilisateur',
],
],
'activation_mode' => [
'label' => 'Mode d\'activation',
'instructions' => 'Comment les utilisateurs sont activés après inscription ?',
'option' => [
'email' => 'Envoyer un email d\'activation à l\'utilisateur.',
'manual' => 'Activer manuellement les nouveaux utilisateurs par un administrateur.',
'automatic' => 'Activer automatiquement après inscription.',
],
],
'password_length' => [
'label' => 'Longueur du mot de passe',
'instructions' => 'Spécifier la longueur minimum des mots de passe.',
],
'password_requirements' => [
'label' => 'Obligations du mot de passe',
'instructions' => 'Spécifier les obligations de caractère des mot de passe.',
'option' => [
'[0-9]' => 'Le mot de passe doit contenir au moins un nombre.',
'[a-z]' => 'Le mot de passe doit contenir au moins une lettre en minuscule.',
'[A-Z]' => 'Le mot de passe doit contenir au moins une lettre en majuscule.',
'[!@#$%^&*()]' => 'Le mot de passe doit contenir au moins un un caractère spécial.',
],
],
'new_user_notification' => [
'name' => 'Notification nouvel utilisateur',
'instructions' => 'Qui doit être notifié des nouveaux utilisateurs ?',
],
'pending_user_notification' => [
'name' => 'Notification utilisateur en attente',
'instructions' => 'Qui doit être notifié des utilisateurs nécessitant une activation ?',
],
];

View File

@ -0,0 +1,10 @@
<?php
return [
'users' => [
'name' => 'Utilisateurs',
],
'roles' => [
'name' => 'Rôles',
],
];

View File

@ -0,0 +1,7 @@
<?php
return [
'reset_password' => 'Votre mot de passe a été changé.',
'activate_user' => 'Votre compte a été activé.',
'user_registered' => 'Votre inscription a été prise en compte.',
];

View File

@ -0,0 +1,6 @@
<?php
return [
'general' => 'Général',
'profile' => 'Profil',
];

View File

@ -0,0 +1,7 @@
<?php
return [
'online' => 'Actif',
'inactive' => 'Inactif',
'enabled' => 'Activé',
];

View File

@ -0,0 +1,6 @@
<?php
return [
'modify_admin_user' => 'Les administrateurs ne peuvent être modifiés.',
'modify_admin_role' => 'Le rôle administrateur ne peut être modifié.',
];

View File

@ -0,0 +1,12 @@
<?php
return [
'title' => 'Felhasználók',
'name' => 'Felhasználók Modul',
'description' => 'Felhasználók, szerepek és jogok kezelése.',
'section' => [
'users' => 'Felhasználók',
'roles' => 'Szerepek',
'fields' => 'Mezők',
],
];

View File

@ -0,0 +1,6 @@
<?php
return [
'login' => 'Bejelentkezés',
'permissions' => 'Jogok',
];

Some files were not shown because too many files have changed in this diff Show More