$83 GRAYBYTE WORDPRESS FILE MANAGER $25

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.15.130 | ADMIN IP 216.73.216.51
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bravetechrwanda/itiministry.org/plugins/give/src/Framework/Permissions/

HOME
Current File : /home/bravetechrwanda/itiministry.org/plugins/give/src/Framework/Permissions//UserPermission.php
<?php

namespace Give\Framework\Permissions;

use Give\Framework\Permissions\Traits\WithAdminAccess;

abstract class UserPermission implements Contracts\UserPermissionsInterface
{
    use WithAdminAccess;

    /**
     * Check if user can create (maps to edit capability).
     *
     * @since 4.14.0
     */
    public function canCreate(): bool
    {
        return $this->currentUserCan('edit');
    }

    /**
     * Check if user can view/read.
     *
     * @since 4.14.0
     */
    public function canView(): bool
    {
        return $this->currentUserCan('view');
    }

    /**
     * Check if user can edit.
     *
     * @since 4.14.0
     */
    public function canEdit(): bool
    {
        return $this->currentUserCan('edit');
    }

    /**
     * Check if user can delete.
     *
     * @since 4.14.0
     */
    public function canDelete(): bool
    {
        return $this->currentUserCan('delete');
    }

    /**
     * Check if the current user has the specified capability.
     *
     * @since 4.14.0
     */
    protected function currentUserCan(string $capability): bool
    {
        if ($this->isAdmin()) {
            return true;
        }

        return current_user_can($this->getCapability($capability));
    }

    /**
     * Get the user capability string for the given capability type.
     *
     * @since 4.14.0
     */
    public function getCapability(string $cap): string
    {
        $caps = $this->getCapabilities($this::getType());

        return $caps[$cap] ?? '';
    }

    /**
     * @since 4.14.0
     */
    public function viewCap(): string
    {
        return $this->getCapability('view');
    }

    /**
     * @since 4.14.0
     */
    public function editCap(): string
    {
        return $this->getCapability('edit');
    }

    /**
     * @since 4.14.0
     */
    public function deleteCap(): string
    {
        return $this->getCapability('delete');
    }

    /**
     * @since 4.14.0
     */
    protected function getCapabilities(string $type): array
    {
        return [
            // Post type.
            "edit" => "edit_{$type}s",
            "edit_others" => "edit_others_{$type}s",
            "publish" => "publish_{$type}s",
            "read_private" => "read_private_{$type}s",
            "delete" => "delete_{$type}s",
            "delete_private" => "delete_private_{$type}s",
            "delete_published" => "delete_published_{$type}s",
            "delete_others" => "delete_others_{$type}s",
            "edit_private" => "edit_private_{$type}s",
            "edit_published" => "edit_published_{$type}s",
            "view" => "view_{$type}s",

            // Terms / taxonomies.
            "manage_terms" => "manage_{$type}_terms",
            "edit_terms" => "edit_{$type}_terms",
            "delete_terms" => "delete_{$type}_terms",
            "assign_terms" => "assign_{$type}_terms",

            // Custom capabilities.
            "view_stats" => "view_{$type}_stats",
            "import" => "import_{$type}s"
        ];
    }
}


Current_dir [ WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
25 May 2026 4.20 PM
bravetechrwanda / bravetechrwanda
0755
Contracts
--
25 May 2026 4.20 PM
bravetechrwanda / bravetechrwanda
0755
Facades
--
25 May 2026 4.20 PM
bravetechrwanda / bravetechrwanda
0755
Migrations
--
25 May 2026 4.20 PM
bravetechrwanda / bravetechrwanda
0755
Traits
--
25 May 2026 4.20 PM
bravetechrwanda / bravetechrwanda
0755
CampaignPermissions.php
0.338 KB
28 Jan 2026 8.00 PM
bravetechrwanda / bravetechrwanda
0644
DonationFormPermissions.php
0.367 KB
28 Jan 2026 8.00 PM
bravetechrwanda / bravetechrwanda
0644
DonationPermissions.php
0.709 KB
28 Jan 2026 8.00 PM
bravetechrwanda / bravetechrwanda
0644
DonorPermissions.php
0.758 KB
28 Jan 2026 8.00 PM
bravetechrwanda / bravetechrwanda
0644
EventPermissions.php
0.209 KB
28 Jan 2026 8.00 PM
bravetechrwanda / bravetechrwanda
0644
ReportsPermissions.php
1.33 KB
28 Jan 2026 8.00 PM
bravetechrwanda / bravetechrwanda
0644
SensitiveDataPermissions.php
0.473 KB
28 Jan 2026 8.00 PM
bravetechrwanda / bravetechrwanda
0644
SettingsPermissions.php
0.921 KB
28 Jan 2026 8.00 PM
bravetechrwanda / bravetechrwanda
0644
SubscriptionPermissions.php
0.212 KB
28 Jan 2026 8.00 PM
bravetechrwanda / bravetechrwanda
0644
UserPermission.php
2.962 KB
28 Jan 2026 8.00 PM
bravetechrwanda / bravetechrwanda
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF Static GIF