added missing permission check on project rates in monthly report (#3627)
This commit is contained in:
@@ -20,7 +20,7 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter;
|
|||||||
final class EntityMultiRoleVoter extends Voter
|
final class EntityMultiRoleVoter extends Voter
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* support rules based on the given activity
|
* support rules based on the given activity/project/customer
|
||||||
*/
|
*/
|
||||||
private const ALLOWED_ATTRIBUTES = [
|
private const ALLOWED_ATTRIBUTES = [
|
||||||
'budget_money',
|
'budget_money',
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
{% set showMoneyBudget = is_granted('budget_money', 'project') %}
|
{% set showMoneyBudget = is_granted('budget_money', 'project') %}
|
||||||
{% set showTimeBudget = is_granted('budget_time', 'project') %}
|
{% set showTimeBudget = is_granted('budget_time', 'project') %}
|
||||||
|
{% set viewRevenue = is_granted('view_rate_other_timesheet') %}
|
||||||
|
|
||||||
{% set columns = {
|
{% set columns = {
|
||||||
'name': {'class': 'alwaysVisible'},
|
'name': {'class': 'alwaysVisible'},
|
||||||
@@ -21,7 +22,13 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% set columns = columns|merge({
|
{% set columns = columns|merge({
|
||||||
'duration': {'class': 'text-center hw-min', 'title': 'stats.durationMonth'|trans, 'columnClass': 'w-min'},
|
'duration': {'class': 'text-center hw-min', 'title': 'stats.durationMonth'|trans, 'columnClass': 'w-min'},
|
||||||
|
}) %}
|
||||||
|
{% if viewRevenue %}
|
||||||
|
{% set columns = columns|merge({
|
||||||
'rate': {'class': 'text-center hw-min', 'title': 'stats.amountMonth'|trans, 'columnClass': 'w-min'},
|
'rate': {'class': 'text-center hw-min', 'title': 'stats.amountMonth'|trans, 'columnClass': 'w-min'},
|
||||||
|
}) %}
|
||||||
|
{% endif %}
|
||||||
|
{% set columns = columns|merge({
|
||||||
'billable': {'class': 'text-center hw-min', 'columnClass': 'w-min'},
|
'billable': {'class': 'text-center hw-min', 'columnClass': 'w-min'},
|
||||||
'actions': {'class': 'actions alwaysVisible'},
|
'actions': {'class': 'actions alwaysVisible'},
|
||||||
}) %}
|
}) %}
|
||||||
|
|||||||
Reference in New Issue
Block a user