Minor: Format code

pull/5271/head
Angel Fernando Quiroz Campos 2 years ago
parent 85b17fa0cd
commit 57b43691a9
  1. 9
      assets/vue/composables/userPermissions.js
  2. 5
      src/CoreBundle/Exception/NotAllowedException.php

@ -1,8 +1,13 @@
import axios from "axios" import axios from "axios"
export async function checkIsAllowedToEdit(tutor = false, coach = false, sessionCoach = false, checkStudentView = true) { export async function checkIsAllowedToEdit(
tutor = false,
coach = false,
sessionCoach = false,
checkStudentView = true,
) {
try { try {
const { data } = await axios.get(window.location.origin + '/permissions/is_allowed_to_edit', { const { data } = await axios.get(window.location.origin + "/permissions/is_allowed_to_edit", {
params: { params: {
tutor, tutor,
coach, coach,

@ -8,11 +8,12 @@ namespace Chamilo\CoreBundle\Exception;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\HttpKernel\Exception\HttpException;
use Throwable;
class NotAllowedException extends HttpException class NotAllowedException extends HttpException
{ {
public function __construct(?string $message = 'Not allowed', ?\Throwable $previous = null, int $code = 0, array $headers = []) public function __construct(?string $message = 'Not allowed', ?Throwable $previous = null, int $code = 0, array $headers = [])
{ {
parent::__construct(Response::HTTP_FORBIDDEN, $message, $previous, $headers); parent::__construct(Response::HTTP_FORBIDDEN, $message, $previous, $headers, $code);
} }
} }

Loading…
Cancel
Save