简体   繁体   中英

sfguard bundle for symfony2

symfony2有一个( Propel )包,是symfony2的sfguard包

There's no sfGuard bundle (yet), but have you checked out FOSUserBundle ? I actually like it better than sfGuard.

The FOSUserBundle does the job and it's fully compatible with Propel. Note the official bundle for Propel is the PropelBundle .

William

sfGuard Bundle for symfony2还不可用。

FOSUserBundle is better than sfGuardUser, it allow to use different data source as ORM (Doctrine), MongoDB/CouchDB ODM or Propel.

Out of the box this Bundle does NOT support database persisted roles, the ACL functionality is allow but only on two level of user: ROLE_USER, and ROLE_ADMIN, this roles can be grant to the user by the command line.

$ php app/console fos:user:promote testuser ROLE_ADMIN

You can found more about how store role on the data source at this link http://blog.jmoz.co.uk/symfony2-fosuserbundle-roles

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM