Questions tagged [sonata-user-bundle]

Integrates the `FOS/UserBundle` in the Sonata Admin Project to add some features related to the users.

Integrates the FOS/UserBundle in the Sonata Admin Project and adds some features:

  • AdminBundle: add user and group management
  • EasyExtends: allows to generate Application level model
  • Features: User profile dashboard, user profile menu, Google Authenticator support (optional), …

The roles to be assigned to users are splitted 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.

To find more information :

244 questions
1
vote
2 answers

Doctrine ManyToOne with join table - filter results

I have a Customer entity and User entity with a JOIN relationship table customers_users. In the Customer entity I have this. /** * @var User * * @ORM\ManyToMany(targetEntity="Entity\User") * @ORM\JoinTable(name="customers_users", * …
1
vote
2 answers

Sonata - Admin User enabled by default

What I need to do is very simple: Have the enabled checkbox checked by default at user creation time in the user admin edit form. I have already extended SonataUserAdminBundle and done some successful modifications. I tried to enable it in the…
Pierre de LESPINAY
  • 44,700
  • 57
  • 210
  • 307
1
vote
1 answer

SonataUserBundle User entity doesn't map changes

I want to make the email field optional. I read that i need to use @AttributeOverrides annotation. My Application\Sonata\UserBundle\Entity\User class: namespace Application\Sonata\UserBundle\Entity; use Sonata\UserBundle\Entity\BaseUser as…
1
vote
1 answer

Extend SonataUserBundle Entity

I want to extend default user entity attributes. In database after extending FOSUserBundle with SonataUserBunle there are 2 tables for storing users: fos_user and fos_user_user. I want to extend fos_user Here is app/AppKernel.php: new…
123dcck
  • 236
  • 1
  • 4
  • 18
1
vote
1 answer

Sonata Admin User - ACL Setup

Trying to use the ACL mode for Sonata Admin. From the docs I understand that STAFF should have ["EDIT","LIST","CREATE"] permissions But when I install the ACL mappings: $ php app/console sonata:admin:setup-acl I see that it's doing (among…
Pierre de LESPINAY
  • 44,700
  • 57
  • 210
  • 307
1
vote
1 answer

Sonata admin and Custom Security handler

I wanna write a custom Security handler and this will be a simple ACL which restrict data by user id. I don't want use a standart ACL, no need to use all functional and create aditional database with permissions. So I create my new handler and now …
user1156168
  • 936
  • 13
  • 32
1
vote
0 answers

After logging in with facebook returning to index page results in DBALException

I'm attempting to integrate FOSUserBundle, SonataUserBundle and the HWIOauth bundle, I've configured the SonataUserBundle to extend the FOSUserBundle. Using this guide as a basis, i've managed to setup the OAuth integration: a user is successfully…
1
vote
1 answer

Sonata User Bundle - redirect loop

I have installed both FOSUserBundle and Sonata Admin bundle First FOSUserBundle worked perfect, with both profile, login and logout. Now with Sonata Admin bundle, I can CRUD my entities. Now I wanted them integrated with login to my backend. Now…
Martin-
  • 876
  • 2
  • 13
  • 30
0
votes
0 answers

Can't create user from UserAdmin (using SonataUserBundle) . Edit working fine

I followed the instructions here to add the SonataUserBundle to my Symfony + Sonata Admin project. I could create users from the cmd line without a problem, as the article suggests. But from the UserAdmin it's not working and instead gives 3 errors…
Catalin
  • 121
  • 1
  • 9
0
votes
1 answer

401 JWT Token not found - Symfony 6 / SonataBundle 5 / Api Platform / LexikJwtAuthenticationBundle

I'm working on a Symfony 6.2 project for an admin panel (for a mobile app). The project has those bundles : Sonata Admin 4.24 Sonata User 5.9 API Platform 3.1 Lexik JWT Authentication 2.19 I have configured and installed the Sonata's bundles and…
0
votes
0 answers

Symfony is injecting the wrong class as a dependency

As I am trying to load the $userManager parameter in the following class: final class AclUserManager implements AdminAclUserManagerInterface { private $userManager; public function __construct(UserManagerInterface $userManager) { …
0
votes
0 answers

Sonata user bundle - acl editor: hide default admin entity, change admin entity label

I have two question about acl privileges editor. How can I hide default admin entity? I found information that in my own admin entity I can use show_in_roles_matrix but this roles are added to admin automaticly. How can I hange name admin entity…
Tomasz Filipek
  • 579
  • 1
  • 6
  • 17
0
votes
0 answers

SonataUserBundle with multiple doctrine database: Validators uses default doctrine manager, not the one for the User class

I've setup my Symfony project with multiple databases, in the hope to one day implement a modular monolith infrastructure. My User class is stored in a specific database which is not doctrine default. I've set this mapping in doctrine_mongodb.yaml: …
Biapy
  • 349
  • 3
  • 9
0
votes
2 answers

Allow only ROLE_ADMIN to manage users in Sonata Admin

I have a Symfony 5.4 project using sonata-project/admin-bundle 4.9 and sonata-project/user-bundle 5.0.0-rc.1 and I want to let only the users with role ROLE_ADMIN to manage the users (CREATE/LIST/EDIT/DELETE), for other roles I want to hide the…
David
  • 369
  • 3
  • 14
0
votes
0 answers

symfony 4.4 sonata admin and sonata user compatible issue

I tried to install symfony 4.4 instead. after the installation, I tried to install sonata user bundle and got this error: The child node "db_driver" at path "fos_user" must be configured. then I followed this…