Replace has_role with is_granted

pull/3768/head
Julio Montoya 5 years ago
parent 3078deed83
commit 4192931568
  1. 4
      src/CoreBundle/Controller/Admin/PluginsController.php
  2. 2
      src/CoreBundle/Controller/IndexController.php
  3. 2
      src/CoreBundle/Controller/ToolController.php
  4. 8
      src/LtiBundle/Controller/AdminController.php
  5. 4
      src/LtiBundle/Controller/CourseController.php

@ -14,7 +14,7 @@ use Symfony\Component\Routing\Annotation\Route;
class PluginsController extends BaseController
{
/**
* @Security("has_role('ROLE_ADMIN')")
* @Security("is_granted('ROLE_ADMIN')")
*
* @Route("/plugins")
*
@ -34,7 +34,7 @@ class PluginsController extends BaseController
}
/**
* @Security("has_role('ROLE_ADMIN')")
* @Security("is_granted('ROLE_ADMIN')")
*
* @Route("/plugins/add")
*

@ -32,7 +32,7 @@ class IndexController extends BaseController
*
* @Route("/toggle_student_view", methods={"GET"})
*
* @Security("has_role('ROLE_TEACHER')")
* @Security("is_granted('ROLE_TEACHER')")
*/
public function toggleStudentViewAction(Request $request): Response
{

@ -18,7 +18,7 @@ class ToolController extends AbstractController
/**
* Updates the table tool and resource_type with the content of tools.yml.
*
* @Security("has_role('ROLE_ADMIN')")
* @Security("is_granted('ROLE_ADMIN')")
* @Route("/update", methods={"GET"})
*/
public function profileAction(ToolChain $toolChain)

@ -20,7 +20,7 @@ class AdminController extends BaseController
/**
* @Route("/", name="chamilo_lti_admin")
*
* @Security("has_role('ROLE_ADMIN')")
* @Security("is_granted('ROLE_ADMIN')")
*/
public function adminAction(): Response
{
@ -33,7 +33,7 @@ class AdminController extends BaseController
/**
* @Route("/add", name="chamilo_lti_admin_add")
*
* @Security("has_role('ROLE_ADMIN')")
* @Security("is_granted('ROLE_ADMIN')")
*/
public function adminAddAction(Request $request): Response
{
@ -73,7 +73,7 @@ class AdminController extends BaseController
/**
* @Route("/edit/{toolId}", name="chamilo_lti_admin_edit", requirements={"toolId"="\d+"})
*
* @Security("has_role('ROLE_ADMIN')")
* @Security("is_granted('ROLE_ADMIN')")
*
* @param int $toolId
*
@ -127,7 +127,7 @@ class AdminController extends BaseController
/**
* @Route("/delete/{toolId}", name="chamilo_lti_admin_delete", requirements={"toolId"="\d+"})
*
* @Security("has_role('ROLE_ADMIN')")
* @Security("is_granted('ROLE_ADMIN')")
*
* @param int $toolId
*

@ -366,7 +366,7 @@ class CourseController extends BaseController
* @Route("/", name="chamilo_lti_configure")
* @Route("/add/{id}", name="chamilo_lti_configure_global", requirements={"id"="\d+"})
*
* @Security("has_role('ROLE_TEACHER')")
* @Security("is_granted('ROLE_TEACHER')")
*
* @param string $id
*/
@ -470,7 +470,7 @@ class CourseController extends BaseController
/**
* @Route("/grade/{catId}", name="chamilo_lti_grade", requirements={"catId"="\d+"})
*
* @Security("has_role('ROLE_TEACHER')")
* @Security("is_granted('ROLE_TEACHER')")
*
* @param string $catId
*

Loading…
Cancel
Save