Browse Source

[doc] add a note on how to configure user class

Thomas Rabaix 13 years ago
parent
commit
626a86d6bc

+ 1 - 0
Resources/doc/index.rst

@@ -10,3 +10,4 @@ Reference Guide
 
    reference/introduction
    reference/installation
+   reference/advanced_configuration

+ 30 - 0
Resources/doc/reference/advanced_configuration.rst

@@ -0,0 +1,30 @@
+Advanced Configuration
+======================
+
+Full configuration options:
+
+.. code-block:: yaml
+
+    fos_user:
+        db_driver:        orm # can be orm or odm
+        firewall_name:    main
+        user_class:       Application\Sonata\UserBundle\Entity\User
+
+        group:
+            group_class:  Application\Sonata\UserBundle\Entity\Group
+
+    sonata_user:
+        security_acl:     false
+        class:
+            user:         Application\Sonata\UserBundle\Entity\User
+            group:        Application\Sonata\UserBundle\Entity\Group
+
+    # Enable Doctrine to map the provided entities
+    doctrine:
+        orm:
+            entity_managers:
+                default:
+                    mappings:
+                        FOSUserBundle: ~
+                        ApplicationSonataUserBundle: ~
+                        SonataUserBundle: ~

+ 2 - 2
Resources/doc/reference/introduction.rst

@@ -5,10 +5,10 @@ Integrate the FOS/UserBundle in the Sonata Admin Project
 
  - AdminBundle: add user and group management
  - EasyExtends: allows to generate Application level model
-    
+
 The roles to be assigned to users is split in 2 parts:
 
  - editable: the roles the current user is allowed to assign to other users (permission or role ``MASTER``)
  - readonly: the roles assigned to the current user, however the current user is only allowed to see them
 
- When using ACL, the UserBundle prevents ``normal`` user to change settings of ``super-admin`` users.
+When using ACL, the UserBundle prevents ``normal`` user to change settings of ``super-admin`` users.