mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 23:06:08 -06:00
#3267 emlak24 feb. issues
This commit is contained in:
parent
34ee9af233
commit
b0c794759b
@ -11,7 +11,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="preview-actions text-center">
|
<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]) %}
|
{% set continueLink = url_route('visiosoft.module.packages::add_package', [adv.id]) %}
|
||||||
{% elseif isActive('dopings') %}
|
{% elseif isActive('dopings') %}
|
||||||
{% set continueLink = url_route('add_doping', [adv.id]) %}
|
{% set continueLink = url_route('add_doping', [adv.id]) %}
|
||||||
|
|||||||
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -3,7 +3,6 @@
|
|||||||
use Anomaly\Streams\Platform\Addon\Plugin\Plugin;
|
use Anomaly\Streams\Platform\Addon\Plugin\Plugin;
|
||||||
use Visiosoft\ProfileModule\Adress\Command\GetAddress;
|
use Visiosoft\ProfileModule\Adress\Command\GetAddress;
|
||||||
use Visiosoft\ProfileModule\Adress\Command\GetAddressByUser;
|
use Visiosoft\ProfileModule\Adress\Command\GetAddressByUser;
|
||||||
use Visiosoft\ProfileModule\Profile\Command\Authorize;
|
|
||||||
use Visiosoft\ProfileModule\Profile\Command\GetProfileDetail;
|
use Visiosoft\ProfileModule\Profile\Command\GetProfileDetail;
|
||||||
|
|
||||||
class ProfileModulePlugin extends Plugin
|
class ProfileModulePlugin extends Plugin
|
||||||
@ -47,12 +46,6 @@ class ProfileModulePlugin extends Plugin
|
|||||||
return $ad;
|
return $ad;
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
new \Twig_SimpleFunction(
|
|
||||||
'authorize',
|
|
||||||
function ($permission) {
|
|
||||||
return $this->dispatch(new Authorize($permission));
|
|
||||||
}
|
|
||||||
)
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user