<commit_before><?php

namespace Oro\Bundle\UserBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

use Oro\Bundle\SecurityBundle\Annotation\Acl;
use Oro\Bundle\SecurityBundle\Annotation\AclAncestor;
use Oro\Bundle\UserBundle\Entity\User;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;

class ConfigurationController extends Controller
{
    /**
     * @Route(
     *      "/user/{id}/{activeGroup}/{activeSubGroup}",
     *      name="oro_user_config",
     *      requirements={"id"="\d+"},
     *      defaults={"activeGroup" = null, "activeSubGroup" = null}
     * )
     * @Template()
     * @Acl(
     *      id="oro_user_user_config",
     *      type="entity",
     *      class="OroUserBundle:User",
     *      permission="CONFIGURE"
     * )
     * @param User $entity
     * @param null $activeGroup
     * @param null $activeSubGroup
     * @return array
     */
    public function userConfigAction(User $entity, $activeGroup = null, $activeSubGroup = null)
    {

        if (!$this->get('oro_security.security_facade')->isGranted('update_own_configuration')) {
            throw new AccessDeniedException();
        }

        $result = $this->config($entity, $activeGroup, $activeSubGroup);
        $result['routeName'] = 'oro_user_config';
        $result['routeParameters'] = ['id' => $entity->getId()];

        return $result;
    }
<commit_msg>BAP-11112: Access Personal Configuration cannot disable Personal - fixed PHPDOC on method<commit_after><?php

namespace Oro\Bundle\UserBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

use Oro\Bundle\SecurityBundle\Annotation\Acl;
use Oro\Bundle\SecurityBundle\Annotation\AclAncestor;
use Oro\Bundle\UserBundle\Entity\User;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;

class ConfigurationController extends Controller
{
    /**
     * @Route(
     *      "/user/{id}/{activeGroup}/{activeSubGroup}",
     *      name="oro_user_config",
     *      requirements={"id"="\d+"},
     *      defaults={"activeGroup" = null, "activeSubGroup" = null}
     * )
     * @Template()
     * @Acl(
     *      id="oro_user_user_config",
     *      type="entity",
     *      class="OroUserBundle:User",
     *      permission="CONFIGURE"
     * )
     *
     * @param User $entity
     * @param null $activeGroup
     * @param null $activeSubGroup
     * @return array
     */
    public function userConfigAction(User $entity, $activeGroup = null, $activeSubGroup = null)
    {

        if (!$this->get('oro_security.security_facade')->isGranted('update_own_configuration')) {
            throw new AccessDeniedException();
        }

        $result = $this->config($entity, $activeGroup, $activeSubGroup);
        $result['routeName'] = 'oro_user_config';
        $result['routeParameters'] = ['id' => $entity->getId()];

        return $result;
    }

{'fraction_non_alphanumeric': 0.13472777606890188, 'fraction_numerical': 0.0015379883112888342, 'mean_word_length': 3.312997347480106, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5451189', 'n_tokens_mistral': 967, 'n_tokens_neox': 961, 'n_words': 155}