aboutsummaryrefslogtreecommitdiffhomepage
path: root/main/app/sprinkles/admin/src/Sprunje/PermissionUserSprunje.php
diff options
context:
space:
mode:
Diffstat (limited to 'main/app/sprinkles/admin/src/Sprunje/PermissionUserSprunje.php')
-rw-r--r--main/app/sprinkles/admin/src/Sprunje/PermissionUserSprunje.php48
1 files changed, 0 insertions, 48 deletions
diff --git a/main/app/sprinkles/admin/src/Sprunje/PermissionUserSprunje.php b/main/app/sprinkles/admin/src/Sprunje/PermissionUserSprunje.php
deleted file mode 100644
index eba23c3..0000000
--- a/main/app/sprinkles/admin/src/Sprunje/PermissionUserSprunje.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;
-
-/**
- * PermissionUserSprunje
- *
- * Implements Sprunje for retrieving a list of users for a specified permission.
- *
- * @author Alex Weissman (https://alexanderweissman.com)
- */
-class PermissionUserSprunje extends UserSprunje
-{
- protected $name = 'permission_users';
-
- /**
- * {@inheritDoc}
- */
- protected function baseQuery() {
- // Requires a permission id
- if (!isset($this->options['permission_id'])) {
- throw new BadRequestException();
- }
-
- $permission = $this->classMapper->staticMethod('permission', 'find', $this->options['permission_id']);
-
- // If the permission doesn't exist, return 404
- if (!$permission) {
- throw new NotFoundException;
- }
-
- // Get permission users
- $query = $permission->users()->withVia('roles_via');
-
- return $query;
- }
-}