#3267 emlak24 feb. issues

This commit is contained in:
diashalabi 2021-02-26 19:14:15 +03:00
parent 34ee9af233
commit b0c794759b
3 changed files with 1 additions and 26 deletions

View File

@ -11,7 +11,7 @@
</p>
</div>
<div class="preview-actions text-center">
{% if isActive('packages') and setting_value('visiosoft.module.packages::move_the_buy_package_to_the_end') %}
{% if isActive('packages') and setting_value('visiosoft.module.packages::move_the_buy_package_to_the_end') and (auth_user().isAdmin or not auth_user().hasPermission('visiosoft.module.packages::packages.no_read')) %}
{% set continueLink = url_route('visiosoft.module.packages::add_package', [adv.id]) %}
{% elseif isActive('dopings') %}
{% set continueLink = url_route('add_doping', [adv.id]) %}

View File

@ -1,18 +0,0 @@
<?php namespace Visiosoft\ProfileModule\Profile\Command;
use Anomaly\Streams\Platform\Support\Authorizer;
class Authorize
{
protected $permission;
public function __construct($permission)
{
$this->permission = $permission;
}
public function handle(Authorizer $authorizer)
{
return $authorizer->authorize($this->permission);
}
}

View File

@ -3,7 +3,6 @@
use Anomaly\Streams\Platform\Addon\Plugin\Plugin;
use Visiosoft\ProfileModule\Adress\Command\GetAddress;
use Visiosoft\ProfileModule\Adress\Command\GetAddressByUser;
use Visiosoft\ProfileModule\Profile\Command\Authorize;
use Visiosoft\ProfileModule\Profile\Command\GetProfileDetail;
class ProfileModulePlugin extends Plugin
@ -47,12 +46,6 @@ class ProfileModulePlugin extends Plugin
return $ad;
}
),
new \Twig_SimpleFunction(
'authorize',
function ($permission) {
return $this->dispatch(new Authorize($permission));
}
)
];
}
}