Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[plugins] added sfDoctrineGuardPlugin.
- Loading branch information
Hugo Hamon
committed
May 3, 2012
1 parent
887550c
commit 8aa029d
Showing
96 changed files
with
4,335 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright (c) 2004-2006 Fabien Potencier | ||
|
||
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. |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0.4 |
182 changes: 182 additions & 0 deletions
182
plugins/sfDoctrineGuardPlugin/config/doctrine/schema.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
sfGuardGroup: | ||
actAs: [Timestampable] | ||
columns: | ||
name: | ||
type: string(255) | ||
unique: true | ||
description: string(1000) | ||
relations: | ||
Users: | ||
class: sfGuardUser | ||
refClass: sfGuardUserGroup | ||
local: group_id | ||
foreign: user_id | ||
foreignAlias: Groups | ||
Permissions: | ||
class: sfGuardPermission | ||
local: group_id | ||
foreign: permission_id | ||
refClass: sfGuardGroupPermission | ||
foreignAlias: Groups | ||
|
||
sfGuardPermission: | ||
actAs: [Timestampable] | ||
columns: | ||
name: | ||
type: string(255) | ||
unique: true | ||
description: string(1000) | ||
|
||
sfGuardGroupPermission: | ||
options: | ||
symfony: | ||
form: false | ||
filter: false | ||
actAs: [Timestampable] | ||
columns: | ||
group_id: | ||
type: integer | ||
primary: true | ||
permission_id: | ||
type: integer | ||
primary: true | ||
relations: | ||
Group: | ||
class: sfGuardGroup | ||
local: group_id | ||
onDelete: CASCADE | ||
Permission: | ||
class: sfGuardPermission | ||
local: permission_id | ||
onDelete: CASCADE | ||
|
||
sfGuardUser: | ||
actAs: [Timestampable] | ||
columns: | ||
first_name: string(255) | ||
last_name: string(255) | ||
email_address: | ||
type: string(255) | ||
notnull: true | ||
unique: true | ||
username: | ||
type: string(128) | ||
notnull: true | ||
unique: true | ||
algorithm: | ||
type: string(128) | ||
default: sha1 | ||
notnull: true | ||
salt: string(128) | ||
password: string(128) | ||
is_active: | ||
type: boolean | ||
default: 1 | ||
is_super_admin: | ||
type: boolean | ||
default: false | ||
last_login: | ||
type: timestamp | ||
indexes: | ||
is_active_idx: | ||
fields: [is_active] | ||
relations: | ||
Groups: | ||
class: sfGuardGroup | ||
local: user_id | ||
foreign: group_id | ||
refClass: sfGuardUserGroup | ||
foreignAlias: Users | ||
Permissions: | ||
class: sfGuardPermission | ||
local: user_id | ||
foreign: permission_id | ||
refClass: sfGuardUserPermission | ||
foreignAlias: Users | ||
|
||
sfGuardUserPermission: | ||
options: | ||
symfony: | ||
form: false | ||
filter: false | ||
actAs: [Timestampable] | ||
columns: | ||
user_id: | ||
type: integer | ||
primary: true | ||
permission_id: | ||
type: integer | ||
primary: true | ||
relations: | ||
User: | ||
class: sfGuardUser | ||
local: user_id | ||
onDelete: CASCADE | ||
Permission: | ||
class: sfGuardPermission | ||
local: permission_id | ||
onDelete: CASCADE | ||
|
||
sfGuardUserGroup: | ||
options: | ||
symfony: | ||
form: false | ||
filter: false | ||
actAs: [Timestampable] | ||
columns: | ||
user_id: | ||
type: integer | ||
primary: true | ||
group_id: | ||
type: integer | ||
primary: true | ||
relations: | ||
User: | ||
class: sfGuardUser | ||
local: user_id | ||
onDelete: CASCADE | ||
Group: | ||
class: sfGuardGroup | ||
local: group_id | ||
onDelete: CASCADE | ||
|
||
sfGuardRememberKey: | ||
options: | ||
symfony: | ||
form: false | ||
filter: false | ||
actAs: [Timestampable] | ||
columns: | ||
user_id: integer | ||
remember_key: string(32) | ||
ip_address: string(50) | ||
relations: | ||
User: | ||
class: sfGuardUser | ||
local: user_id | ||
foreignAlias: RememberKeys | ||
foreignType: one | ||
onDelete: CASCADE | ||
|
||
sfGuardForgotPassword: | ||
options: | ||
symfony: | ||
form: false | ||
filter: false | ||
actAs: [Timestampable] | ||
columns: | ||
user_id: | ||
type: integer | ||
notnull: true | ||
unique_key: string(255) | ||
expires_at: | ||
type: timestamp | ||
notnull: true | ||
relations: | ||
User: | ||
class: sfGuardUser | ||
local: user_id | ||
type: one | ||
foreignType: one | ||
foreignAlias: ForgotPassword | ||
onDelete: CASCADE |
44 changes: 44 additions & 0 deletions
44
plugins/sfDoctrineGuardPlugin/config/sfDoctrineGuardPluginConfiguration.class.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the symfony package. | ||
* (c) Fabien Potencier <fabien.potencier@symfony-project.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
/** | ||
* sfDoctrineGuardPlugin configuration. | ||
* | ||
* @package sfDoctrineGuardPlugin | ||
* @subpackage config | ||
* @author Fabien Potencier <fabien.potencier@symfony-project.com> | ||
* @author Jonathan H. Wage <jonwage@gmail.com> | ||
* @version SVN: $Id: sfDoctrineGuardPluginConfiguration.class.php 30723 2010-08-22 09:51:02Z gimler $ | ||
*/ | ||
class sfDoctrineGuardPluginConfiguration extends sfPluginConfiguration | ||
{ | ||
/** | ||
* @see sfPluginConfiguration | ||
*/ | ||
public function initialize() | ||
{ | ||
if (sfConfig::get('app_sf_guard_plugin_routes_register', true)) | ||
{ | ||
$enabledModules = sfConfig::get('sf_enabled_modules', array()); | ||
if (in_array('sfGuardAuth', $enabledModules)) | ||
{ | ||
$this->dispatcher->connect('routing.load_configuration', array('sfGuardRouting', 'listenToRoutingLoadConfigurationEvent')); | ||
} | ||
|
||
foreach (array('sfGuardUser', 'sfGuardGroup', 'sfGuardPermission', 'sfGuardRegister', 'sfGuardForgotPassword') as $module) | ||
{ | ||
if (in_array($module, $enabledModules)) | ||
{ | ||
$this->dispatcher->connect('routing.load_configuration', array('sfGuardRouting', 'addRouteFor'.str_replace('sfGuard', '', $module))); | ||
} | ||
} | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
plugins/sfDoctrineGuardPlugin/data/fixtures/fixtures.yml.sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
sfGuardUser: | ||
User_admin: | ||
first_name: John | ||
last_name: Doe | ||
email_address: john.doe@gmail.com | ||
username: admin | ||
password: admin | ||
is_super_admin: true | ||
Groups: [Group_admin] | ||
|
||
sfGuardGroup: | ||
Group_admin: | ||
name: admin | ||
description: Administrator group | ||
Permissions: [Permission_admin] | ||
|
||
sfGuardPermission: | ||
Permission_admin: | ||
name: admin | ||
description: Administrator permission |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE xliff PUBLIC "-//XLIFF//DTD XLIFF//EN" "http://www.oasis-open.org/committees/xliff/documents/xliff.dtd" > | ||
<xliff version="1.0"> | ||
<file original="global" source-language="en" datatype="plaintext"> | ||
<header/> | ||
<body> | ||
<trans-unit> | ||
<source>Username</source> | ||
<target>Benutzername</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Username or E-Mail</source> | ||
<target>Benutzername oder E-Mail-Adresse</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Password</source> | ||
<target>Passwort</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Password again</source> | ||
<target>Passwort wiederholen</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Register</source> | ||
<target>Registrieren</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Signin</source> | ||
<target>Anmelden</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Forgot your password?</source> | ||
<target>Passwort vergessen?</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Want to register?</source> | ||
<target>Wollen Sie sich registrieren?</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Login below to gain access</source> | ||
<target>Anmelden um die entsprechenden Rechte zu erhalten</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Oops! The page you asked for is secure and you do not have proper credentials.</source> | ||
<target>Hoppla! Die angeforderte Seite ist gesichert und die entsprechenden Rechte fehlen.</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Hi %first_name%</source> | ||
<target>Hi, %first_name%</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>This e-mail is being sent because you requested information on how to reset your password.</source> | ||
<target>Diese E-Mail wurde versendet, da Sie Anweisungen zum reseten des Passwortes angefordert haben.</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>You can change your password by clicking the below link which is only valid for 24 hours:</source> | ||
<target>Sie können Ihr Passwort ändern in dem Sie den unten stehenden Link, innerhalb der nächsten 24h, anklicken:</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Click to change password</source> | ||
<target>Klicken Sie hier, um Ihr Passwort zu ändern</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Below you will find your username and new password:</source> | ||
<target>Folgend finden Sie Ihren Benutzernamen und Ihr Passwort:</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Do not worry, we can help you get back in to your account safely!</source> | ||
<target>Keine Sorge, wir können Ihnen helfen sicher an Ihre Accountdaten zugelangen.</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Fill out the form below to request an e-mail with information on how to reset your password.</source> | ||
<target>Füllen Sie das unten stehende Formular aus, um eine E-Mail mit Anweisungen zum reseten des Passwortes zu erhalten.</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Request</source> | ||
<target>Erinnern</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Hello %name%</source> | ||
<target>Hallo, %name%</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Enter your new password in the form below.</source> | ||
<target>Geben Sie Ihr neues Passwort in das unten stehende Formularfeld ein.</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Change</source> | ||
<target>Ändern</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Forgot Password Request for %name%</source> | ||
<target>Passwort vergessen für %name%</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>New Password for %name%</source> | ||
<target>Neues Passwort für %name%</target> | ||
</trans-unit> | ||
</body> | ||
</file> | ||
</xliff> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<!DOCTYPE xliff PUBLIC "-//XLIFF//DTD XLIFF//EN" "http://www.oasis-open.org/committees/xliff/documents/xliff.dtd" > | ||
<xliff version="1.0"> | ||
<file original="global" source-language="en" datatype="plaintext"> | ||
<header/> | ||
<body> | ||
<trans-unit> | ||
<source>Username</source> | ||
<target>Usuario</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Password</source> | ||
<target>Contraseña</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Remember</source> | ||
<target>Recordar</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Signin</source> | ||
<target>Conectar</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>Forgot your password?</source> | ||
<target>¿Olvidó su contraseña?</target> | ||
</trans-unit> | ||
<trans-unit> | ||
<source>You don't have the required permission to access this page.</source> | ||
<target>No tiene los permisos requeridos para acceder a esta página.</target> | ||
</trans-unit> | ||
</body> | ||
</file> | ||
</xliff> |
Oops, something went wrong.