* replace has_role() with is_granted() * added basic integration test classes for main controller * added basic integration test classes for admin controller
This commit is contained in:
@@ -18,8 +18,7 @@ use App\Repository\ActivityRepository;
|
||||
/**
|
||||
* Controller used to manage activity contents in the public part of the site.
|
||||
*
|
||||
* @Route("/activity")
|
||||
* @Security("has_role('ROLE_USER')")
|
||||
* @Security("is_granted('ROLE_USER')")
|
||||
*/
|
||||
class ActivityController extends Controller
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ use App\Repository\Query\ActivityQuery;
|
||||
* Controller used to manage activities in the admin part of the site.
|
||||
*
|
||||
* @Route("/admin/activity")
|
||||
* @Security("has_role('ROLE_ADMIN')")
|
||||
* @Security("is_granted('ROLE_ADMIN')")
|
||||
* @Security("is_granted('IS_AUTHENTICATED_FULLY')")
|
||||
*/
|
||||
class ActivityController extends AbstractController
|
||||
|
||||
@@ -24,7 +24,7 @@ use App\Repository\Query\CustomerQuery;
|
||||
* Controller used to manage activities in the admin part of the site.
|
||||
*
|
||||
* @Route("/admin/customer")
|
||||
* @Security("has_role('ROLE_ADMIN')")
|
||||
* @Security("is_granted('ROLE_ADMIN')")
|
||||
* @Security("is_granted('IS_AUTHENTICATED_FULLY')")
|
||||
*/
|
||||
class CustomerController extends AbstractController
|
||||
|
||||
@@ -26,7 +26,7 @@ use App\Repository\Query\ProjectQuery;
|
||||
* Controller used to manage projects in the admin part of the site.
|
||||
*
|
||||
* @Route("/admin/project")
|
||||
* @Security("has_role('ROLE_ADMIN')")
|
||||
* @Security("is_granted('ROLE_ADMIN')")
|
||||
* @Security("is_granted('IS_AUTHENTICATED_FULLY')")
|
||||
*/
|
||||
class ProjectController extends AbstractController
|
||||
|
||||
@@ -25,7 +25,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
||||
* Controller used for manage timesheet entries in the admin part of the site.
|
||||
*
|
||||
* @Route("/team/timesheet")
|
||||
* @Security("has_role('ROLE_TEAMLEAD')")
|
||||
* @Security("is_granted('ROLE_TEAMLEAD')")
|
||||
* @Security("is_granted('IS_AUTHENTICATED_FULLY')")
|
||||
*/
|
||||
class TimesheetController extends AbstractController
|
||||
|
||||
@@ -24,7 +24,7 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
* Controller used to manage users in the admin part of the site.
|
||||
*
|
||||
* @Route("/admin/user")
|
||||
* @Security("has_role('ROLE_SUPER_ADMIN')")
|
||||
* @Security("is_granted('ROLE_SUPER_ADMIN')")
|
||||
* @Security("is_granted('IS_AUTHENTICATED_FULLY')")
|
||||
*/
|
||||
class UserController extends AbstractController
|
||||
|
||||
@@ -24,7 +24,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
||||
* Dashboard controller for the admin area.
|
||||
*
|
||||
* @Route("/dashboard")
|
||||
* @Security("has_role('ROLE_USER')")
|
||||
* @Security("is_granted('ROLE_USER')")
|
||||
*/
|
||||
class DashboardController extends Controller
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
||||
* This controller can render the markdown documentation from /var/docs/
|
||||
*
|
||||
* @Route("/help")
|
||||
* @Security("has_role('ROLE_USER')")
|
||||
* @Security("is_granted('ROLE_USER')")
|
||||
*/
|
||||
class HelpController extends Controller
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
* Controller used to manage invoices.
|
||||
*
|
||||
* @Route("/invoice")
|
||||
* @Security("has_role('ROLE_TEAMLEAD')")
|
||||
* @Security("is_granted('ROLE_TEAMLEAD')")
|
||||
*/
|
||||
class InvoiceController extends AbstractController
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
* User profile controller
|
||||
*
|
||||
* @Route("/profile")
|
||||
* @Security("has_role('ROLE_USER')")
|
||||
* @Security("is_granted('ROLE_USER')")
|
||||
*/
|
||||
class ProfileController extends AbstractController
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
|
||||
/**
|
||||
* Sidebar controller
|
||||
*
|
||||
* @Security("has_role('ROLE_USER')")
|
||||
* @Security("is_granted('ROLE_USER')")
|
||||
*/
|
||||
class SidebarController extends AbstractController
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
* Controller used to manage timesheet contents in the public part of the site.
|
||||
*
|
||||
* @Route("/timesheet")
|
||||
* @Security("has_role('ROLE_USER')")
|
||||
* @Security("is_granted('ROLE_USER')")
|
||||
*/
|
||||
class TimesheetController extends AbstractController
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user