Initial commit

This commit is contained in:
root
2026-05-09 17:28:23 +02:00
commit 9d73f82529
5575 changed files with 281989 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Auth\Access\HandlesAuthorization;
class AchievementPolicy
{
use HandlesAuthorization;
public function viewAny()
{
return hasHousekeepingPermission('manage_achievements');
}
public function view()
{
return hasHousekeepingPermission('manage_achievements');
}
public function create()
{
return hasHousekeepingPermission('manage_achievements');
}
public function update()
{
return hasHousekeepingPermission('manage_achievements');
}
}
+49
View File
@@ -0,0 +1,49 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Spatie\Activitylog\Models\Activity;
class ActivityPolicy
{
use HandlesAuthorization;
public function viewAny(User $user): bool
{
return hasHousekeepingPermission('view_activity_logs');
}
public function view(User $user, Activity $activity): bool
{
return hasHousekeepingPermission('view_activity_logs');
}
public function create(User $user): bool
{
return false;
}
public function update(User $user, Activity $activity): bool
{
return false;
}
public function delete(User $user, Activity $activity): bool
{
return false;
}
public function restore(User $user, Activity $activity): bool
{
return false;
}
public function forceDelete(User $user, Activity $activity): bool
{
return false;
}
}
+34
View File
@@ -0,0 +1,34 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Illuminate\Auth\Access\Response;
class BanPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*
* @return Response|bool
*/
public function viewAny(User $user)
{
return hasHousekeepingPermission('manage_bans');
}
/**
* Determine whether the user can delete the model.
*
* @return Response|bool
*/
public function delete(User $user)
{
return hasHousekeepingPermission('manage_bans');
}
}
+33
View File
@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class CameraPolicy
{
use HandlesAuthorization;
public function viewAny(User $user)
{
return hasHousekeepingPermission('manage_camera_web');
}
public function view(User $user)
{
return hasHousekeepingPermission('manage_camera_web');
}
public function create(User $user)
{
return hasHousekeepingPermission('manage_camera_web');
}
public function update(User $user)
{
return hasHousekeepingPermission('manage_camera_web');
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class CatalogPagePolicy
{
use HandlesAuthorization;
public function viewAny(User $user)
{
return hasHousekeepingPermission('manage_catalog_pages');
}
public function view(User $user)
{
return hasHousekeepingPermission('manage_catalog_pages');
}
public function create(User $user)
{
return hasHousekeepingPermission('manage_catalog_pages');
}
public function update(User $user)
{
return hasHousekeepingPermission('manage_catalog_pages');
}
public function delete(User $user)
{
return hasHousekeepingPermission('delete_catalog_pages');
}
}
+18
View File
@@ -0,0 +1,18 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class ChatlogPrivatePolicy
{
use HandlesAuthorization;
public function viewAny(User $user): bool
{
return hasHousekeepingPermission('manage_private_chatlogs');
}
}
+18
View File
@@ -0,0 +1,18 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class ChatlogRoomPolicy
{
use HandlesAuthorization;
public function viewAny(User $user): bool
{
return hasHousekeepingPermission('manage_room_chatlogs');
}
}
+18
View File
@@ -0,0 +1,18 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class CommandLogPolicy
{
use HandlesAuthorization;
public function viewAny(User $user): bool
{
return hasHousekeepingPermission('manage_commandlogs');
}
}
+32
View File
@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Auth\Access\HandlesAuthorization;
class EmulatorSettingPolicy
{
use HandlesAuthorization;
public function viewAny()
{
return hasHousekeepingPermission('manage_emulator_settings');
}
public function view()
{
return hasHousekeepingPermission('manage_emulator_settings');
}
public function create()
{
return hasHousekeepingPermission('manage_emulator_settings');
}
public function update()
{
return hasHousekeepingPermission('manage_emulator_settings');
}
}
+32
View File
@@ -0,0 +1,32 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use Illuminate\Auth\Access\HandlesAuthorization;
class EmulatorTextPolicy
{
use HandlesAuthorization;
public function viewAny()
{
return hasHousekeepingPermission('manage_emulator_texts');
}
public function view()
{
return hasHousekeepingPermission('manage_emulator_texts');
}
public function create()
{
return hasHousekeepingPermission('manage_emulator_texts');
}
public function update()
{
return hasHousekeepingPermission('manage_emulator_texts');
}
}
+33
View File
@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class HousekeepingPermissionPolicy
{
use HandlesAuthorization;
public function viewAny(User $user)
{
return hasHousekeepingPermission('manage_housekeeping_permissions');
}
public function view(User $user)
{
return hasHousekeepingPermission('manage_housekeeping_permissions');
}
public function create(User $user)
{
return hasHousekeepingPermission('manage_housekeeping_permissions');
}
public function update(User $user)
{
return hasHousekeepingPermission('manage_housekeeping_permissions');
}
}
+64
View File
@@ -0,0 +1,64 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Illuminate\Auth\Access\Response;
class PermissionPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*
* @return Response|bool
*/
public function viewAny(User $user)
{
return hasHousekeepingPermission('manage_permissions');
}
/**
* Determine whether the user can view the model.
*
* @return Response|bool
*/
public function view(User $user)
{
return hasHousekeepingPermission('manage_permissions');
}
/**
* Determine whether the user can create models.
*
* @return Response|bool
*/
public function create(User $user)
{
return hasHousekeepingPermission('manage_permissions');
}
/**
* Determine whether the user can update the model.
*
* @return Response|bool
*/
public function update(User $user)
{
return hasHousekeepingPermission('manage_permissions');
}
/**
* Determine whether the user can delete the model.
*
* @return Response|bool
*/
public function delete(User $user)
{
return hasHousekeepingPermission('delete_permissions');
}
}
+49
View File
@@ -0,0 +1,49 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\RadioApplication;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class RadioApplicationPolicy
{
use HandlesAuthorization;
public function viewAny(User $user): bool
{
return hasHousekeepingPermission('manage_radio_applications');
}
public function view(User $user, RadioApplication $radioApplication): bool
{
return hasHousekeepingPermission('manage_radio_applications');
}
public function create(User $user): bool
{
return hasHousekeepingPermission('manage_radio_applications');
}
public function update(User $user, RadioApplication $radioApplication): bool
{
return hasHousekeepingPermission('manage_radio_applications');
}
public function delete(User $user, RadioApplication $radioApplication): bool
{
return hasHousekeepingPermission('manage_radio_applications');
}
public function restore(User $user, RadioApplication $radioApplication): bool
{
return hasHousekeepingPermission('manage_radio_applications');
}
public function forceDelete(User $user, RadioApplication $radioApplication): bool
{
return hasHousekeepingPermission('manage_radio_applications');
}
}
+64
View File
@@ -0,0 +1,64 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Illuminate\Auth\Access\Response;
class TagPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*
* @return Response|bool
*/
public function viewAny(User $user)
{
return hasHousekeepingPermission('manage_tags');
}
/**
* Determine whether the user can view the model.
*
* @return Response|bool
*/
public function view(User $user)
{
return hasHousekeepingPermission('manage_tags');
}
/**
* Determine whether the user can create models.
*
* @return Response|bool
*/
public function create(User $user)
{
return hasHousekeepingPermission('manage_tags');
}
/**
* Determine whether the user can update the model.
*
* @return Response|bool
*/
public function update(User $user)
{
return hasHousekeepingPermission('manage_tags');
}
/**
* Determine whether the user can delete the model.
*
* @return Response|bool
*/
public function delete(User $user)
{
return hasHousekeepingPermission('manage_tags');
}
}
+54
View File
@@ -0,0 +1,54 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Illuminate\Auth\Access\Response;
class UserPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*
* @return Response|bool
*/
public function viewAny(User $user)
{
return hasHousekeepingPermission('edit_user');
}
/**
* Determine whether the user can view the model.
*
* @return Response|bool
*/
public function view(User $user)
{
return hasHousekeepingPermission('edit_user');
}
/**
* Determine whether the user can update the model.
*
* @return Response|bool
*/
public function update(User $user)
{
return hasHousekeepingPermission('edit_user');
}
/**
* Determine whether the user can delete the model.
*
* @return Response|bool
*/
public function delete(User $user)
{
return hasHousekeepingPermission('delete_user');
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class WebsiteArticlePolicy
{
use HandlesAuthorization;
public function viewAny(User $user)
{
return hasHousekeepingPermission('write_article');
}
public function view(User $user)
{
return hasHousekeepingPermission('write_article');
}
public function create(User $user)
{
return hasHousekeepingPermission('write_article');
}
public function update(User $user)
{
return hasHousekeepingPermission('edit_article');
}
public function delete(User $user)
{
return hasHousekeepingPermission('delete_article');
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class WebsiteSettingPolicy
{
use HandlesAuthorization;
public function viewAny(User $user)
{
return hasHousekeepingPermission('manage_website_settings');
}
public function view(User $user)
{
return hasHousekeepingPermission('manage_website_settings');
}
public function create(User $user)
{
return hasHousekeepingPermission('manage_website_settings');
}
public function update(User $user)
{
return hasHousekeepingPermission('manage_website_settings');
}
public function delete(User $user)
{
return hasHousekeepingPermission('delete_website_settings');
}
}
+64
View File
@@ -0,0 +1,64 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
use Illuminate\Auth\Access\Response;
class WebsiteTeamPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*
* @return Response|bool
*/
public function viewAny(User $user)
{
return hasHousekeepingPermission('manage_teams');
}
/**
* Determine whether the user can view the model.
*
* @return Response|bool
*/
public function view(User $user)
{
return hasHousekeepingPermission('manage_teams');
}
/**
* Determine whether the user can create models.
*
* @return Response|bool
*/
public function create(User $user)
{
return hasHousekeepingPermission('manage_teams');
}
/**
* Determine whether the user can update the model.
*
* @return Response|bool
*/
public function update(User $user)
{
return hasHousekeepingPermission('manage_teams');
}
/**
* Determine whether the user can delete the model.
*
* @return Response|bool
*/
public function delete(User $user)
{
return hasHousekeepingPermission('manage_teams');
}
}
+65
View File
@@ -0,0 +1,65 @@
<?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\User;
use App\Models\Wordfilter;
use Illuminate\Auth\Access\HandlesAuthorization;
use Illuminate\Auth\Access\Response;
class WordfilterPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*
* @return Response|bool
*/
public function viewAny(User $user)
{
return hasHousekeepingPermission('manage_wordfilter');
}
/**
* Determine whether the user can view the model.
*
* @return Response|bool
*/
public function view(User $user, Wordfilter $wordfilter)
{
return hasHousekeepingPermission('manage_wordfilter');
}
/**
* Determine whether the user can create models.
*
* @return Response|bool
*/
public function create(User $user)
{
return hasHousekeepingPermission('manage_wordfilter');
}
/**
* Determine whether the user can update the model.
*
* @return Response|bool
*/
public function update(User $user, Wordfilter $wordfilter)
{
return hasHousekeepingPermission('manage_wordfilter');
}
/**
* Determine whether the user can delete the model.
*
* @return Response|bool
*/
public function delete(User $user, Wordfilter $wordfilter)
{
return hasHousekeepingPermission('manage_wordfilter');
}
}