Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/syn.corals.io/Corals/core/User/Communication/Policies/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/syn.corals.io/Corals/core/User/Communication/Policies/NotificationTemplatePolicy.php
<?php

namespace Corals\User\Communication\Policies;

use Corals\Foundation\Policies\BasePolicy;
use Corals\User\Communication\Models\NotificationTemplate;
use Corals\User\Models\User;

class NotificationTemplatePolicy extends BasePolicy
{

    protected $administrationPermission = 'Administrations::admin.user';

    /**
     * @param User $user
     * @param NotificationTemplate|null $notification_template
     * @return bool
     */
    public function view(User $user, NotificationTemplate $notification_template = null)
    {
        if ($user->can('Notification::notification_template.view')) {
            return true;
        }
        return false;
    }

    /**
     * @param User $user
     * @return bool
     */
    public function create(User $user)
    {
        return false;
    }

    /**
     * @param User $user
     * @param NotificationTemplate $notification_template
     * @return bool
     */
    public function update(User $user, NotificationTemplate $notification_template)
    {
        if ($user->can('Notification::notification_template.update')) {
            return true;
        }
        return false;
    }

    /**
     * @param User $user
     * @param NotificationTemplate $notification_template
     * @return bool
     */
    public function destroy(User $user, NotificationTemplate $notification_template)
    {
        if ($user->can('Notification::notification_template.delete')) {
            return true;
        }
        return false;
    }
}

Spamworldpro Mini