aboutsummaryrefslogtreecommitdiffhomepage
path: root/main/app/sprinkles/admin/src/Sprunje/UserPermissionSprunje.php
diff options
context:
space:
mode:
Diffstat (limited to 'main/app/sprinkles/admin/src/Sprunje/UserPermissionSprunje.php')
-rw-r--r--main/app/sprinkles/admin/src/Sprunje/UserPermissionSprunje.php48
1 files changed, 0 insertions, 48 deletions
diff --git a/main/app/sprinkles/admin/src/Sprunje/UserPermissionSprunje.php b/main/app/sprinkles/admin/src/Sprunje/UserPermissionSprunje.php
deleted file mode 100644
index 3f4b58f..0000000
--- a/main/app/sprinkles/admin/src/Sprunje/UserPermissionSprunje.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/**
- * UserFrosting (http://www.userfrosting.com)
- *
- * @link https://github.com/userfrosting/UserFrosting
- * @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
- */
-
-namespace UserFrosting\Sprinkle\Admin\Sprunje;
-
-use Illuminate\Database\Capsule\Manager as Capsule;
-use UserFrosting\Sprinkle\Core\Facades\Debug;
-use UserFrosting\Support\Exception\BadRequestException;
-use UserFrosting\Support\Exception\NotFoundException;
-
-/**
- * UserPermissionSprunje
- *
- * Implements Sprunje for retrieving a list of permissions for a specified user.
- *
- * @author Alex Weissman (https://alexanderweissman.com)
- */
-class UserPermissionSprunje extends PermissionSprunje
-{
- protected $name = 'user_permissions';
-
- /**
- * {@inheritDoc}
- */
- protected function baseQuery() {
- // Requires a user id
- if (!isset($this->options['user_id'])) {
- throw new BadRequestException();
- }
-
- $user = $this->classMapper->staticMethod('user', 'find', $this->options['user_id']);
-
- // If the user doesn't exist, return 404
- if (!$user) {
- throw new NotFoundException;
- }
-
- // Get user permissions
- $query = $user->permissions()->withVia('roles_via');
-
- return $query;
- }
-}