Add forgot password feature

This commit is contained in:
Frederic Guillot
2016-01-09 17:28:31 -05:00
parent 03032c3190
commit 26e3996014
50 changed files with 997 additions and 33 deletions

View File

@@ -126,7 +126,9 @@ class AuthenticationProvider implements ServiceProviderInterface
$acl->setRoleHierarchy(Role::APP_USER, array(Role::APP_PUBLIC));
$acl->add('Oauth', array('google', 'github', 'gitlab'), Role::APP_PUBLIC);
$acl->add('Auth', array('login', 'check', 'captcha'), Role::APP_PUBLIC);
$acl->add('Auth', array('login', 'check'), Role::APP_PUBLIC);
$acl->add('Captcha', '*', Role::APP_PUBLIC);
$acl->add('PasswordReset', '*', Role::APP_PUBLIC);
$acl->add('Webhook', '*', Role::APP_PUBLIC);
$acl->add('Task', 'readonly', Role::APP_PUBLIC);
$acl->add('Board', 'readonly', Role::APP_PUBLIC);

View File

@@ -32,6 +32,7 @@ class ClassProvider implements ServiceProviderInterface
'Link',
'Notification',
'OverdueNotification',
'PasswordReset',
'Project',
'ProjectActivity',
'ProjectAnalytic',
@@ -84,6 +85,9 @@ class ClassProvider implements ServiceProviderInterface
'UserFilterAutoCompleteFormatter',
'GroupAutoCompleteFormatter',
),
'Validator' => array(
'PasswordResetValidator',
),
'Core' => array(
'DateParser',
'Helper',

View File

@@ -205,6 +205,10 @@ class RouteProvider implements ServiceProviderInterface
$container['route']->addRoute('oauth/gitlab', 'oauth', 'gitlab');
$container['route']->addRoute('login', 'auth', 'login');
$container['route']->addRoute('logout', 'auth', 'logout');
// PasswordReset
$container['route']->addRoute('forgot-password', 'PasswordReset', 'create');
$container['route']->addRoute('forgot-password/change/:token', 'PasswordReset', 'change');
}
return $container;