aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/JsonApi/Routes/Themes/Authority.php
blob: 9d9598d08aaf38cca97e7a343abf6b1cef481467 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php

namespace JsonApi\Routes\Themes;

use User;

class Authority
{
    public static function canIndexThemes(User $user): bool
    {
        return $GLOBALS['perm']->have_perm('root', $user->id);
    }
    public static function canShowTheme(User $user): bool
    {
        return self::canIndexThemes($user);
    }

    public static function canDeleteTheme(User $user): bool
    {
        return self::canIndexThemes($user);
    }

    public static function canUpdateTheme(User $user): bool
    {
        return self::canIndexThemes($user);
    }

    public static function canCreateTheme(User $user): bool
    {
        return self::canIndexThemes($user);
    }
}