release 1.16.1 (#2938)

* optional csrf token name
* fix regression when selecting all projects as super user
* prevent invalid sql
This commit is contained in:
Kevin Papst
2021-11-16 21:48:50 +01:00
committed by GitHub
parent 99ebd1d503
commit c858edf5c9
4 changed files with 9 additions and 5 deletions

View File

@@ -372,7 +372,9 @@ class ProjectRepository extends EntityRepository
// begin > from and end < to // begin > from and end < to
// ... and more ... // ... and more ...
$times = $this->addProjectStartAndEndDate($qb, $query->getProjectStart(), $query->getProjectEnd()); $times = $this->addProjectStartAndEndDate($qb, $query->getProjectStart(), $query->getProjectEnd());
if ($times->count() > 0) {
$qb->andWhere($times); $qb->andWhere($times);
}
$this->addPermissionCriteria($qb, $query->getCurrentUser()); $this->addPermissionCriteria($qb, $query->getCurrentUser());

View File

@@ -228,6 +228,8 @@ class TeamRepository extends EntityRepository
$qb->setParameter('teamIds', array_unique($ids)); $qb->setParameter('teamIds', array_unique($ids));
} }
if ($or->count() > 0) {
$qb->andWhere($or); $qb->andWhere($or);
} }
} }
}

View File

@@ -1,4 +1,4 @@
{% embed '@AdminLTE/Widgets/box-widget.html.twig' with {'form': form, 'comments': comments, 'route_pin': route_pin|default(null), 'route_delete': route_delete|default(null), 'delete_by_user': delete_by_user|default(false), 'csrf_delete': csrf_token(csrf_delete), 'csrf_pin': csrf_token(csrf_pin)} %} {% embed '@AdminLTE/Widgets/box-widget.html.twig' with {'form': form, 'comments': comments, 'route_pin': route_pin|default(null), 'route_delete': route_delete|default(null), 'delete_by_user': delete_by_user|default(false), 'csrf_delete': csrf_token(csrf_delete|default('comment.delete')), 'csrf_pin': csrf_token(csrf_pin|default('comment.pin'))} %}
{% import "macros/widgets.html.twig" as widgets %} {% import "macros/widgets.html.twig" as widgets %}
{% block box_title %}{{ 'label.comment'|trans }}{% endblock %} {% block box_title %}{{ 'label.comment'|trans }}{% endblock %}
{% block box_attributes %}id="comments_box"{% endblock %} {% block box_attributes %}id="comments_box"{% endblock %}