This topic contains 2 replies, has 2 voices, and was last updated by Rodolfo 9 years, 1 month ago.
- Topic
Hi there!
I’m creating a feature here that the user will be able to modify a custom value. I got this solution from Symfony code methods.. but I’m not sure if this is the best way to do this in OroCRM. What do you guys think? Can I use this or there is a better solution?
Thank you!
12345678$user = $this->getUser();if ($entity->getId() != $user->getId() ){if (false === $this->get("security.context")->isGranted("ROLE_ADMINISTRATOR")) {throw new AccessDeniedException();}}Reference:
http://symfony.com/doc/current/book/security.html#securing-controllers-and-other-code
The forum ‘OroPlatform – Security’ is closed to new topics and replies.