Skip to content

Commit

Permalink
Merge branch 'master' of github.com:chamilo/chamilo-lms
Browse files Browse the repository at this point in the history
  • Loading branch information
ywarnier committed May 16, 2024
2 parents c9113f6 + 4dd2b0e commit f4a8604
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions public/main/inc/lib/api.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ function api_protect_teacher_script()
*/
function api_block_anonymous_users($printHeaders = true)
{
$isAuth = Container::getAuthorizationChecker()->isGranted('IS_AUTHENTICATED_FULLY');
$isAuth = Container::getAuthorizationChecker()->isGranted('IS_AUTHENTICATED');

if (false === $isAuth) {
api_not_allowed($printHeaders);
Expand Down Expand Up @@ -3516,7 +3516,7 @@ function api_is_allowed_to_session_edit($tutor = false, $coach = false)
*/
function api_is_anonymous()
{
return !Container::getAuthorizationChecker()->isGranted('IS_AUTHENTICATED_FULLY');
return !Container::getAuthorizationChecker()->isGranted('IS_AUTHENTICATED');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/CoreBundle/Resources/views/Course/about.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
{% if is_premium == false %}
<h5>{{ 'CourseSubscription'|trans }}</h5>
<div class="session-subscribe">
{% if not is_granted('IS_AUTHENTICATED_FULLY') %}
{% if not is_granted('IS_AUTHENTICATED') %}
{% if 'allow_registration'|api_get_setting != 'false' %}
<a href="{{ _p.web_main ~ 'auth/inscription.php' ~ redirect_to_session }}" class="btn btn--success btn-block btn-lg">
<i class="fa fa-pencil" aria-hidden="true"></i> {{ 'SignUp'|trans }}
Expand Down
4 changes: 2 additions & 2 deletions src/CoreBundle/Resources/views/Session/about.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@
{% if is_premium == false %}
<h5>{{ 'CourseSubscription'|trans }}</h5>
<div class="session-subscribe">
{% if is_granted('IS_AUTHENTICATED_FULLY') and not is_subscribed %}
{% if is_granted('IS_AUTHENTICATED') and not is_subscribed %}
{# {{ subscribe_button }}#}
{% elseif not is_granted('IS_AUTHENTICATED_FULLY') %}
{% elseif not is_granted('IS_AUTHENTICATED') %}
{% if 'allow_registration'|api_get_setting != 'false' %}
<a href="{{ _p.web_main ~ 'auth/inscription.php' ~ redirect_to_session }}"
class="btn btn--success btn-block btn-lg">
Expand Down

0 comments on commit f4a8604

Please sign in to comment.