Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to audit user roles #295

Closed
braianj opened this issue Aug 3, 2017 · 3 comments
Closed

How to audit user roles #295

braianj opened this issue Aug 3, 2017 · 3 comments
Labels

Comments

@braianj
Copy link

braianj commented Aug 3, 2017

Q A
Bug report? no
Feature request? yes
BC Break report? no

Hello, I was able to implement part of the code, and add into config.yml

simple_things_entity_audit:
    global_ignore_columns:
        - ts
        - tu
        - salt
        - password
    audited_entities:
        - LoginBundle\Entity\Users
        - LoginBundle\Entity\Roles

But I can't audit the table users_roles, since there is no entity for that table.
Inside Users entity I have this

  /**
    * @var \Doctrine\Common\Collections\Collection
    *
    * @ORM\ManyToMany(targetEntity="LoginBundle\Entity\Roles", inversedBy="users")
    * @ORM\JoinTable(name="users_roles",
    *   joinColumns={
    *     @ORM\JoinColumn(name="id_user", referencedColumnName="id")
    *   },
    *   inverseJoinColumns={
    *     @ORM\JoinColumn(name="id_rol", referencedColumnName="id")
    *   }
    * )
    */
   private $roles;

   public function __construct()
   {
       $this->roles = new \Doctrine\Common\Collections\ArrayCollection();
   }

And inside roles

/**
  * @var \Doctrine\Common\Collections\Collection
  *
  * @ORM\ManyToMany(targetEntity="LoginBundle\Entity\Users", mappedBy="roles")
  */
 private $users;

And then it will be usefull to know how to user the templates already created by this repo.

Best

@tolry
Copy link
Contributor

tolry commented Aug 3, 2017

Not an expert on these advanced features, but take a look at #99

@halilibrahim
Copy link
Contributor

Does anyone have a solution for this?

I'm using v1.0.7

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants