Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
Doorcode
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Guardians of the Kretschmar Elock System
Doorcode
Commits
43e690d3
Commit
43e690d3
authored
Dec 15, 2020
by
Jacob Priddy
👌
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.cs.wallawalla.edu:elock/doorcode
parents
f23b6a20
1e751be9
Pipeline
#13227
passed with stages
in 4 minutes and 14 seconds
Changes
31
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
132 additions
and
181 deletions
+132
-181
.gitlab-ci.yml
.gitlab-ci.yml
+8
-1
Dockerfile
Dockerfile
+1
-0
php/dev.ini
php/dev.ini
+6
-0
php/prod.ini
php/prod.ini
+5
-0
prod.Dockerfile
prod.Dockerfile
+1
-0
src/backend/.env.example
src/backend/.env.example
+0
-1
src/backend/app/Documentation/Strategies/ApplicationRepositoryResetStrategy.php
...ntation/Strategies/ApplicationRepositoryResetStrategy.php
+0
-28
src/backend/app/Documentation/Strategies/BodyAuthenticationStrategy.php
...p/Documentation/Strategies/BodyAuthenticationStrategy.php
+3
-0
src/backend/app/Documentation/Strategies/GetAuthenticationStrategy.php
...pp/Documentation/Strategies/GetAuthenticationStrategy.php
+3
-0
src/backend/app/Documentation/Strategies/GoodResponseValidationStrategy.php
...cumentation/Strategies/GoodResponseValidationStrategy.php
+2
-0
src/backend/app/Documentation/Strategies/PaginationStrategy.php
...ckend/app/Documentation/Strategies/PaginationStrategy.php
+3
-0
src/backend/app/Documentation/Strategies/UnauthenticatedResponseStrategy.php
...umentation/Strategies/UnauthenticatedResponseStrategy.php
+2
-0
src/backend/app/Http/Controllers/Api/AttemptsController.php
src/backend/app/Http/Controllers/Api/AttemptsController.php
+0
-1
src/backend/app/Http/Controllers/Api/AuthController.php
src/backend/app/Http/Controllers/Api/AuthController.php
+8
-0
src/backend/app/Http/Controllers/Api/DoorController.php
src/backend/app/Http/Controllers/Api/DoorController.php
+0
-4
src/backend/app/Http/Controllers/Api/DoorsController.php
src/backend/app/Http/Controllers/Api/DoorsController.php
+4
-18
src/backend/app/Http/Controllers/Api/EntriesController.php
src/backend/app/Http/Controllers/Api/EntriesController.php
+0
-1
src/backend/app/Http/Controllers/Api/GroupScheduleController.php
...kend/app/Http/Controllers/Api/GroupScheduleController.php
+4
-12
src/backend/app/Http/Controllers/Api/GroupsController.php
src/backend/app/Http/Controllers/Api/GroupsController.php
+1
-8
src/backend/app/Http/Controllers/Api/MeController.php
src/backend/app/Http/Controllers/Api/MeController.php
+0
-13
src/backend/app/Http/Controllers/Api/OverridesController.php
src/backend/app/Http/Controllers/Api/OverridesController.php
+0
-4
src/backend/app/Http/Controllers/Api/RequestsController.php
src/backend/app/Http/Controllers/Api/RequestsController.php
+0
-3
src/backend/app/Http/Controllers/Api/SchedulesController.php
src/backend/app/Http/Controllers/Api/SchedulesController.php
+1
-9
src/backend/app/Http/Controllers/Api/TokensController.php
src/backend/app/Http/Controllers/Api/TokensController.php
+1
-5
src/backend/app/Http/Controllers/Api/UsersController.php
src/backend/app/Http/Controllers/Api/UsersController.php
+5
-17
src/backend/composer.json
src/backend/composer.json
+2
-2
src/backend/composer.lock
src/backend/composer.lock
+32
-30
src/backend/config/scribe.php
src/backend/config/scribe.php
+37
-23
src/backend/public/css/.gitignore
src/backend/public/css/.gitignore
+1
-0
src/backend/public/js/.gitignore
src/backend/public/js/.gitignore
+1
-0
src/backend/src/Sanitize/Paginates.php
src/backend/src/Sanitize/Paginates.php
+1
-1
No files found.
.gitlab-ci.yml
View file @
43e690d3
...
...
@@ -68,7 +68,14 @@ generate_api_docs:
script
:
-
cd src/backend
-
sed -i 's/\(^APP_ENV=\).*/\1memory/' .env
-
"
if
(php
artisan
apidoc:generate
|
grep
\"
Exception
\"
)
then
echo
\"
Failed
to
generate
API
docs.
\"
&&
false;
else
true;
fi"
-
sed -i "s/\(^APP_URL=\).*/\1https:\/\/${DEPLOY_ADDRESS}/" .env
# TEMPORARY UNTIL THIS BRANCH GETS MERGED INTO THE SCRIBE PROJECT
# PHP 8 came out less than a month ago and not everything supports it yet T_T
-
cd vendor/knuckleswtf
-
rm -rf scribe
-
git clone --branch php8 https://github.com/knuckleswtf/scribe.git
-
cd ../..
-
"
if
(php
artisan
scribe:generate
|
grep
\"
Exception
\"
)
then
echo
\"
Failed
to
generate
API
docs.
\"
&&
false;
else
true;
fi"
artifacts
:
paths
:
-
src/backend/public/docs
...
...
Dockerfile
View file @
43e690d3
...
...
@@ -31,6 +31,7 @@ RUN docker-php-ext-install pdo \
pdo_pgsql
\
bcmath
\
fileinfo
\
opcache
\
gd
# Install composer
...
...
php/dev.ini
View file @
43e690d3
...
...
@@ -10,3 +10,9 @@ display_errors = On
date.timezone
=
"America/Los_Angeles"
memory_limit
=
256M
# Enable PHP JIT
opcache.enable
=
1
opcache.enable_cli
=
1
opcache.jit_buffer_size
=
100M
opcache.jit
=
tracing
php/prod.ini
View file @
43e690d3
error_reporting
=
E_ALL & ~E_DEPRECATED & ~E_STRICT
date.timezone
=
"America/Los_Angeles"
memory_limit
=
256M
opcache.enable
=
1
opcache.enable_cli
=
1
opcache.jit_buffer_size
=
100M
opcache.jit
=
tracing
prod.Dockerfile
View file @
43e690d3
...
...
@@ -28,6 +28,7 @@ RUN docker-php-ext-install pdo \
pdo_pgsql
\
bcmath
\
fileinfo
\
opcache
\
gd
# Install composer
...
...
src/backend/.env.example
View file @
43e690d3
...
...
@@ -19,6 +19,5 @@ DB_PASSWORD=secret
SAML_SIMPLESAMLPHP_AUTOLOAD=/var/simplesamlphp/lib/_autoload.php
SAML_SIMPLESAMLPHP_AUTH_SOURCE=default-sp
FRONTEND_URL=https://localhost:8080
SUPPORT_EMAIL="Support email not configured"
src/backend/app/Documentation/Strategies/ApplicationRepositoryResetStrategy.php
deleted
100644 → 0
View file @
f23b6a20
<?php
namespace
App\Documentation\Strategies
;
use
ReflectionClass
;
use
Illuminate\Routing\Route
;
use
ReflectionFunctionAbstract
;
use
Knuckles\Scribe\Tools\DocumentationConfig
;
use
Knuckles\Scribe\Extracting\Strategies\Strategy
;
class
ApplicationRepositoryResetStrategy
extends
Strategy
{
public
function
__construct
(
DocumentationConfig
$config
)
{
// Set the config to use in memory implementations
config
([
'app.env'
,
'memory'
]);
parent
::
__construct
(
$config
);
}
/**
* @inheritDoc
*/
public
function
__invoke
(
Route
$route
,
ReflectionClass
$controller
,
ReflectionFunctionAbstract
$method
,
array
$routeRules
,
array
$alreadyExtractedData
=
[])
{
return
null
;
}
}
src/backend/app/Documentation/Strategies/BodyAuthenticationStrategy.php
View file @
43e690d3
...
...
@@ -10,6 +10,8 @@ use Knuckles\Scribe\Extracting\Strategies\Strategy;
class
BodyAuthenticationStrategy
extends
Strategy
{
public
$stage
=
'bodyParameters'
;
/**
* @inheritDoc
*/
...
...
@@ -30,6 +32,7 @@ class BodyAuthenticationStrategy extends Strategy
return
[
'api_token'
=>
[
'name'
=>
'api_token'
,
'type'
=>
'string'
,
'description'
=>
'The api authentication token to use. Can be used in place of a bearer token.'
,
'required'
=>
false
,
...
...
src/backend/app/Documentation/Strategies/GetAuthenticationStrategy.php
View file @
43e690d3
...
...
@@ -10,6 +10,8 @@ use Knuckles\Scribe\Extracting\Strategies\Strategy;
class
GetAuthenticationStrategy
extends
Strategy
{
public
$stage
=
'queryParameters'
;
/**
* @inheritDoc
*/
...
...
@@ -30,6 +32,7 @@ class GetAuthenticationStrategy extends Strategy
return
[
'api_token'
=>
[
'name'
=>
'api_token'
,
'type'
=>
'string'
,
'description'
=>
'The api authentication token to use. Can be used in place of a bearer token.'
,
'required'
=>
false
,
...
...
src/backend/app/Documentation/Strategies/GoodResponseValidationStrategy.php
View file @
43e690d3
...
...
@@ -11,6 +11,8 @@ use Knuckles\Scribe\Extracting\Strategies\Strategy;
class
GoodResponseValidationStrategy
extends
Strategy
{
public
$stage
=
'responses'
;
protected
const
EXCLUDED
=
[
'logout'
,
'saml.login'
,
...
...
src/backend/app/Documentation/Strategies/PaginationStrategy.php
View file @
43e690d3
...
...
@@ -10,6 +10,8 @@ use Knuckles\Scribe\Extracting\Strategies\Strategy;
class
PaginationStrategy
extends
Strategy
{
public
$stage
=
'queryParameters'
;
/**
* @inheritDoc
*/
...
...
@@ -25,6 +27,7 @@ class PaginationStrategy extends Strategy
return
[
'page'
=>
[
'name'
=>
'page'
,
'type'
=>
'integer'
,
'description'
=>
'The page of paginated data to get.'
,
'required'
=>
false
,
...
...
src/backend/app/Documentation/Strategies/UnauthenticatedResponseStrategy.php
View file @
43e690d3
...
...
@@ -10,6 +10,8 @@ use Knuckles\Scribe\Extracting\Strategies\Strategy;
class
UnauthenticatedResponseStrategy
extends
Strategy
{
public
$stage
=
'responses'
;
/**
* @inheritDoc
*/
...
...
src/backend/app/Http/Controllers/Api/AttemptsController.php
View file @
43e690d3
...
...
@@ -22,7 +22,6 @@ class AttemptsController extends ApiController
* is supplied, all attempts before the start date are given. If both dates are supplied,
* all attempts between the given dates are returned. This route is paginated.
*
* @authenticated
* @paginated
* @queryParam start The beginning date to filter attempts by. Example: 2000-06-02 08:11:45
* @queryParam end The ending date to filter attempts by. Example: 2920-06-02 08:11:45
...
...
src/backend/app/Http/Controllers/Api/AuthController.php
View file @
43e690d3
...
...
@@ -40,6 +40,8 @@ class AuthController extends ApiController
*
* This endpoint requires no auth and is the welcome page for any API user.
*
* @unauthenticated
*
* @return \Illuminate\Http\JsonResponse
*/
public
function
welcome
():
JsonResponse
...
...
@@ -53,6 +55,7 @@ class AuthController extends ApiController
* This endpoint returns a token that can be used in other endpoints as well as setting a cookie.
* One does not need to make a request to this if they have a valid token.
*
* @unauthenticated
* @bodyParam email string required The email of the login user. Example: sithL0rd@senate.com
* @bodyParam password string required The password of the user to login as. Example: I am the senate
*
...
...
@@ -89,6 +92,7 @@ class AuthController extends ApiController
*
* This route redirects the user to the running SAML authentication instance to start authentication with SAML
*
* @unauthenticated
* @urlParam intended The url to redirect back to once authentication is successful.
*
* @param \Illuminate\Routing\Redirector $redirector
...
...
@@ -109,6 +113,8 @@ class AuthController extends ApiController
*
* This API is only meant to be used by SAML after a return from a login.
*
* @unauthenticated
*
* @param AuthenticateUseCase $authenticateUseCase
* @return mixed
* @throws EntityNotFoundException
...
...
@@ -142,6 +148,8 @@ class AuthController extends ApiController
*
* This endpoint logs out of saml and expires the associated api/login token and cookie.
*
* @unauthenticated
*
* @param AuthenticateUseCase $authenticateUseCase
* @return RedirectResponse
*/
...
...
src/backend/app/Http/Controllers/Api/DoorController.php
View file @
43e690d3
...
...
@@ -72,7 +72,6 @@ class DoorController extends ApiController
* Also processes commands that are separated by a '*' from the doorcode. If a command is accepted a 200 is
* returned. If a command is rejected, a 403 is given.
*
* @authenticated
* @bodyParam doorcode string required The doorcode to query. Example: 123456*00110
* @bodyParam foresight int Number of minutes ahead of now to get the open mode times for. Example: 720
*
...
...
@@ -109,7 +108,6 @@ class DoorController extends ApiController
* key press as a valid door unlock. Retrieves the open mode times for the next interval. Includes open mode
* schedules as well as overrides. The door to get the times for is based off of the authenticated door.
*
* @authenticated
* @queryParam foresight Number of minutes ahead of now to get the open mode times for. Example: 720
*
* @response 422
...
...
@@ -129,8 +127,6 @@ class DoorController extends ApiController
* This route returns the newest binary that the door controllers should be running based upon the authenticated
* door. If there are no binaries on record, a 404 response is returned.
*
* @authenticated
*
* @response 404 {"status":"error","code":404,"message":"Entity not found"}
*
* @param \Source\UseCases\Door\UpdateBinary\UpdateBinaryUseCase $updateBinaryUseCase
...
...
src/backend/app/Http/Controllers/Api/DoorsController.php
View file @
43e690d3
...
...
@@ -36,7 +36,6 @@ class DoorsController extends ApiController
* This endpoint can list/search/query the list of doors. If the parameter is not given, it returns all doors
* paginated. If either awol_seconds or active_seconds are negative, they will be ignored.
*
* @authenticated
* @paginated
* @queryParam query Searches doors for location, name, and version. Example: bat
* @queryParam awol_seconds Filters doors that have been missing for x seconds. Example: -1
...
...
@@ -70,8 +69,6 @@ class DoorsController extends ApiController
*
* This endpoint gets a specific door and returns information relating directly to the door.
*
* @authenticated
*
* @response 404 {"status":"error","code":404,"message":"Entity not found"}
*
* @param \Source\UseCases\Doors\GetDoor\GetDoorUseCase $getDoor
...
...
@@ -96,7 +93,6 @@ class DoorsController extends ApiController
*
* This endpoint creates a new door in the system.
*
* @authenticated
* @bodyParam location string required Door Number or location describing where it is such as `CSP165`. Example: CSP165
* @bodyParam name string required The unique name for the door. Must be unique. Example: Engineering Lecture Hall
*
...
...
@@ -128,7 +124,6 @@ class DoorsController extends ApiController
*
* This route updates a door in the system. It does not modify the associated door token.
*
* @authenticated
* @urlParam doorId required The application ID of the door to update. Example: 2
* @bodyParam location string Door Number or location describing where it is such as `CSP165`. Example: CSP166
* @bodyParam name string The unique name for the door. Must be unique. Example: Not the Engineering Lecture Hall
...
...
@@ -165,7 +160,6 @@ class DoorsController extends ApiController
* generated. If for some reason it gets lost, or compromised, this endpoint can be used to regenerate the
* associated door token.
*
* @authenticated
* @urlParam doorId required The application ID of the door to update. Example: 2
*
* @param \Source\UseCases\Doors\GenerateDoorToken\GenerateDoorTokenUseCase $tokenGenerator
...
...
@@ -192,7 +186,6 @@ class DoorsController extends ApiController
* This endpoint deletes a door in the system. Once deleted it cannot be recovered and the door
* will no longer be able to make requests.
*
* @authenticated
* @urlParam doorId required The application ID of the door to update. Example: 2
*
* @param \Source\UseCases\Doors\DeleteDoor\DeleteDoorUseCase $doorDelyeeter
...
...
@@ -218,7 +211,6 @@ class DoorsController extends ApiController
* This endpoint gets the list of groups that a door is apart of.
*
* @paginated
* @authenticated
* @urlParam doorId required The door ID to get the groups for. Example: 1
*
* @param \Source\UseCases\DoorGroup\GetDoorGroups\GetDoorGroupsUseCase $doorGroups
...
...
@@ -243,11 +235,8 @@ class DoorsController extends ApiController
*
* This endpoint attaches a list of doors to a list of groups by ids.
*
* @authenticated
* @bodyParam door_ids[0] string[] required The list of door Ids to attach to. Example: 2
* @bodyParam door_ids[1] string[] required The list of door Ids to attach to. Example: 1
* @bodyParam group_ids[0] string[] required The list of group Ids to attach to. Example: 8
* @bodyParam group_ids[1] string[] required The list of group Ids to attach to. Example: 7
* @bodyParam door_ids string[] required The list of door Ids to attach to. Example: [2, 1]
* @bodyParam group_ids string[] required The list of group Ids to attach to. Example: [8, 7]
*
* @param \Source\UseCases\DoorGroup\AddDoorToGroup\AddDoorToGroupUseCase $addDoorToGroup
* @return \Illuminate\Http\JsonResponse
...
...
@@ -280,11 +269,8 @@ class DoorsController extends ApiController
*
* This endpoint removes a list of doors from a list of groups by ids.
*
* @authenticated
* @bodyParam door_ids[0] string[] required The list of door Ids to attach to. Example: 2
* @bodyParam door_ids[1] string[] required The list of door Ids to attach to. Example: 1
* @bodyParam group_ids[0] string[] required The list of group Ids to attach to. Example: 8
* @bodyParam group_ids[1] string[] required The list of group Ids to attach to. Example: 7
* @bodyParam door_ids string[] required The list of door Ids to attach to. Example: [1, 2]
* @bodyParam group_ids string[] required The list of group Ids to attach to. Example: [8, 7]
*
* @param \Source\UseCases\DoorGroup\RemoveDoorFromGroup\RemoveDoorFromGroupUseCase $removeDoorFromGroup
* @return \Illuminate\Http\JsonResponse
...
...
src/backend/app/Http/Controllers/Api/EntriesController.php
View file @
43e690d3
...
...
@@ -21,7 +21,6 @@ class EntriesController extends ApiController
* Filters door entries based upon several query parameters. If no parameters are given, all door entries are
* returned in a paginated fashion.
*
* @authenticated
* @paginated
* @queryParam start The beginning date to filter entries by. Example: 2000-06-02 08:11:45
* @queryParam end The ending date to filter entries by. Example: 2920-06-02 08:11:45
...
...
src/backend/app/Http/Controllers/Api/GroupScheduleController.php
View file @
43e690d3
...
...
@@ -26,11 +26,8 @@ class GroupScheduleController extends ApiController
*
* Attaches groups to schedules.
*
* @authenticated
* @bodyParam schedules[0] string[] required The list of schedule Ids to attach to. Example: 1
* @bodyParam schedules[1] string[] required The list of schedule Ids to attach to. Example: 2
* @bodyParam groups[0] string[] required The list of group Ids to attach to. Example: 7
* @bodyParam groups[1] string[] required The list of group Ids to attach to. Example: 8
* @bodyParam schedules string[] required The list of schedule Ids to attach to. Example: [1, 2]
* @bodyParam groups string[] required The list of group Ids to attach to. Example: [7, 8]
*
* @param \Source\UseCases\GroupSchedule\AddSchedulesToGroups\AddSchedulesToGroupsUseCase $useCase
* @return \Illuminate\Http\JsonResponse
...
...
@@ -65,7 +62,6 @@ class GroupScheduleController extends ApiController
*
* This endpoint returns all groups that a specified schedule is attached to.
*
* @authenticated
* @paginated
* @urlParam scheduleId required The id of the schedule to get the groups for. Example: 1
*
...
...
@@ -89,7 +85,6 @@ class GroupScheduleController extends ApiController
*
* This endpoint returns all schedules that a specified group is attached to.
*
* @authenticated
* @paginated
* @urlParam groupId required The id of the group to get the schedules for. Example: 7
*
...
...
@@ -113,11 +108,8 @@ class GroupScheduleController extends ApiController
*
* Detaches groups from schedules.
*
* @authenticated
* @bodyParam schedules[0] string[] required The list of schedule Ids to attach to. Example: 1
* @bodyParam schedules[1] string[] required The list of schedule Ids to attach to. Example: 2
* @bodyParam groups[0] string[] required The list of group Ids to attach to. Example: 7
* @bodyParam groups[1] string[] required The list of group Ids to attach to. Example: 8
* @bodyParam schedules string[] required The list of schedule Ids to attach to. Example: [1, 2]
* @bodyParam groups string[] required The list of group Ids to attach to. Example: [7, 8]
*
* @param \Source\UseCases\GroupSchedule\RemoveSchedulesFromGroups\RemoveSchedulesFromGroupsUseCase $useCase
* @return \Illuminate\Http\JsonResponse
...
...
src/backend/app/Http/Controllers/Api/GroupsController.php
View file @
43e690d3
...
...
@@ -35,7 +35,6 @@ class GroupsController extends ApiController
*
* Adds a new group to the system.
*
* @authenticated
* @bodyParam title string required The title of the group. Must be unique.
* @bodyParam description string The group description for management.
*
...
...
@@ -67,7 +66,6 @@ class GroupsController extends ApiController
*
* This endpoint removes a group from the system.
*
* @authenticated
* @urlParam groupId required The id of the group to delete. Example: 7
*
* @response 400 {"status":"error","code":400,"message":"Cannot delete a default permission group"}
...
...
@@ -100,7 +98,6 @@ class GroupsController extends ApiController
*
* This endpoint searches groups. If no parameters are given a paginated list of all groups is returned.
*
* @authenticated
* @paginated
* @queryParam query This parameter filters groups on title and description. Example: manage
*
...
...
@@ -130,7 +127,6 @@ class GroupsController extends ApiController
*
* This endpoint gets a groups.
*
* @authenticated
* @urlParam groupId required The ID of the group to get all information from. Example: 1
*
* @response 404 {"status":"error","code":404,"message":"Entity not found"}
...
...
@@ -158,7 +154,7 @@ class GroupsController extends ApiController
* This route updates a group stored in the system. Title's must be unique. Default permission group's titles cannot
* be modified.
*
* @
authenticated
* @
urlParam groupId required The ID of the group to get all information from. Example: 1
* @bodyParam title string required The new title of the group.
* @bodyParam description string required The new group description.
*
...
...
@@ -196,7 +192,6 @@ class GroupsController extends ApiController
*
* This endpoint gets all users attached to a specific group.
*
* @authenticated
* @paginated
* @urlParam groupId required The group to get users for. Example: 1
*
...
...
@@ -222,7 +217,6 @@ class GroupsController extends ApiController
*
* This endpoint gets all doors attached to a specific group.
*
* @authenticated
* @paginated
* @urlParam groupId required The group to get attached doors for. Example: 8
*
...
...
@@ -248,7 +242,6 @@ class GroupsController extends ApiController
*
* This endpoint retrieves the resulting schedules for a group.
*
* @authenticated
* @urlParam groupId required The group to view events for. Example: 1
* @queryParam start required The start date to view events for. Example: 2020-04-03 12:43:22
* @queryParam end required The end date to see events for. Example: 2020-04-05 12:43:22
...
...
src/backend/app/Http/Controllers/Api/MeController.php
View file @
43e690d3
...
...
@@ -36,8 +36,6 @@ class MeController extends ApiController
*
* Retrieves the currently logged in user object.
*
* @authenticated
*
* @param \Source\UseCases\Users\GetUser\GetUserUseCase $useCase
* @return \Illuminate\Http\JsonResponse
* @throws \Source\Exceptions\EntityNotFoundException
...
...
@@ -56,7 +54,6 @@ class MeController extends ApiController
*
* Retrieve all of the groups the current user is apart of. This route is paginated.
*
* @authenticated
* @paginated
*
* @param \Source\UseCases\GroupUser\GetUserGroups\GetUserGroupsUseCase $useCase
...
...
@@ -77,7 +74,6 @@ class MeController extends ApiController
*
* Update the currently logged in user. Automatically prepends emplid (if there is one) to the user
*
* @authenticated
* @bodyParam display_name string The user's display name. Example: Sheev Palpatine
* @bodyParam password string The user's new password. Minimum of 20 characters. Example: My Super Secret P455w0rd
* @bodyParam doorcode string The user's new doorcode, minimum of 11 digits. Example: 292889311069
...
...
@@ -113,7 +109,6 @@ class MeController extends ApiController
*
* Get's the token metadata assigned to the current user.
*
* @authenticated
* @paginated
*
* @param \Source\UseCases\Tokens\GetTokens\GetTokensUseCase $userTokens
...
...
@@ -134,7 +129,6 @@ class MeController extends ApiController
*
* Retrieves the list of permission groups a user is in.
*
* @authenticated
* @response {"permissions":["admin","manage-users","manage-doors","manage-groups","code-query","current-user","logs-read","door-commander"],"status":"success","code":200}
*
* @return \Illuminate\Http\JsonResponse
...
...
@@ -149,8 +143,6 @@ class MeController extends ApiController
*
* Gets a list of the accessible doors, groups, and schedules that the current user has access to.
*
* @authenticated
*
* @param \Source\UseCases\DoorUser\UserDoorAccess\UserDoorAccessUseCase $userDoorAccessUseCase
* @return \Illuminate\Http\JsonResponse
* @throws \Source\Exceptions\EntityNotFoundException
...
...
@@ -170,7 +162,6 @@ class MeController extends ApiController
* This endpoint shows all door events for the current user. These events include user access schedules,
* overrides, and special exclusion rules.
*
* @authenticated
* @queryParam door_id required The door to see events for. Example: 1
* @queryParam start required The start date to view events for. Example: 2020-04-03 12:43:22
* @queryParam end required The end date to see events for. Example: 2020-04-05 12:43:22
...
...
@@ -207,7 +198,6 @@ class MeController extends ApiController
*
* This endpoint creates a access request for admins to review and accept/deny.
*
* @authenticated
* @bodyParam title required string Short description of the access request, maybe the door you want access to. Example: CSP313
* @bodyParam request required string The full request text. Example: Please give me access to everything now.
*
...
...
@@ -237,7 +227,6 @@ class MeController extends ApiController
*
* This endpoint retrieves all of your submitted access requests.
*
* @authenticated
* @paginated
* @queryParam query The query to search for. Example: CSP313
* @queryParam resolved Whether the request is marked as resolved or not. Example: 0
...
...
@@ -270,7 +259,6 @@ class MeController extends ApiController
*
* Deletes a request. You cannot delete a resolved request.
*
* @authenticated
* @urlParam requestId required The id of the request to delete. Example: 3
*
* @param string $requestId
...
...
@@ -293,7 +281,6 @@ class MeController extends ApiController
*
* Updates a request. You cannot update a request that is not yours, or that is resolved.
*
* @authenticated
* @urlParam requestId required The id of the request to modify. Example: 3
* @bodyParam title string The new request title. Example: New title request.
* @bodyParam request string The new body of the request. Example: Fixed type.
...
...
src/backend/app/Http/Controllers/Api/OverridesController.php
View file @
43e690d3
...
...
@@ -29,7 +29,6 @@ class OverridesController extends ApiController
* This endpoint creates an override for a door. Overrides have 2 types.
* A type of 0 means open mode, and a type of 1 means to keep it locked (overrides any access schedules).
*
* @authenticated
* @bodyParam reason string required Documentation field for why the override was created. Example: Demonstration
* @bodyParam door_id int required The door to apply the override to. Example: 1
* @bodyParam type int required The type of override. Example: 0
...
...
@@ -71,7 +70,6 @@ class OverridesController extends ApiController
*
* This endpoint updates an existing override. It cannot update the override type or the applied door.
*
* @authenticated
* @urlParam overrideId required The ID of the override to update. Example: 2
* @bodyParam reason string Documentation field for why the override was created. Example: Demonstration updated
* @bodyParam start datetime The start date/time for the override. Example: 2020-06-04 13:35:50
...
...
@@ -114,7 +112,6 @@ class OverridesController extends ApiController
*
* This endpoint gets a specific override.
*
* @authenticated
* @urlParam overrideId required The ID of the override to update. Example: 2
*
* @param string $overrideId
...
...
@@ -140,7 +137,6 @@ class OverridesController extends ApiController
*
* This endpoint searches/filters overrides.
*
* @authenticated
* @paginated
* @queryParam start The start time to start filtering overrides. Example: 1900-06-04
* @queryParam end The end time to stop filtering overrides. Example: 2900-06-04 12:43:33
...
...
src/backend/app/Http/Controllers/Api/RequestsController.php
View file @
43e690d3
...
...
@@ -21,7 +21,6 @@ class RequestsController extends ApiController
*
* This endpoint marks or un-marks an access request as resolved.
*
* @authenticated
* @urlParam requestId required The id of the request to modify. Example 1
* @bodyParam resolved string Whether the access request should be resolved or not. Example: 0
*
...
...
@@ -49,7 +48,6 @@ class RequestsController extends ApiController
*
* This endpoint replies to a submitted user access request. They can log on and view your submitted reply
*
* @authenticated
* @urlParam requestId required The id of the request to modify. Example 1
* @bodyParam reply string The reply to give to the user. Example: I have rejected your request because you're not good enough
*
...
...
@@ -77,7 +75,6 @@ class RequestsController extends ApiController
*
* This endpoint filters and retrieves submitted access requets.
*
* @authenticated
* @paginated
* @queryParam query The query to search for. Example: CSP313
* @queryParam resolved Whether the request is marked as resolved or not. Example: 0
...
...
src/backend/app/Http/Controllers/Api/SchedulesController.php
View file @
43e690d3
...
...
@@ -38,7 +38,6 @@ class SchedulesController extends ApiController
* See: https://github.com/rlanvin/php-rrule/wiki/RSet
*
*
* @authenticated
* @bodyParam duration integer required The duration in seconds that the event lasts for. Example: 120
* @bodyParam type integer required The type of schedule. Example: 0
* @bodyParam rset string required The RFC 5545 compliant string representing the set. Example: RRULE:FREQ=MINUTELY
...
...
@@ -75,7 +74,6 @@ class SchedulesController extends ApiController
*
* Gets a schedule from the system.
*
* @authenticated
* @urlParam scheduleId required The id of the schedule to retrieve. Example: 1
*
* @param string $scheduleId
...
...
@@ -101,7 +99,6 @@ class SchedulesController extends ApiController
* This endpoint searches/filters schedules in the system by start, end, or type. If no query is provided
* a paginated list of all schedules are returned.
*
* @authenticated
* @paginated
* @queryParam start Filters schedules active after this datetime. Example: 1900-06-04 19:23:55
* @queryParam end Filters schedules active before this datetime. Example: 2900-06-04
...
...
@@ -142,7 +139,6 @@ class SchedulesController extends ApiController
* This endpoint updates a schedule. See the create schedule endpoint description for more information about
* the parameters.
*
* @authenticated
* @urlParam scheduleId required The schedule to update. Example: 1
* @bodyParam duration integer The duration in seconds that the event lasts for. Example: 120
* @bodyParam type integer The type of schedule. Example: 0
...
...
@@ -181,9 +177,7 @@ class SchedulesController extends ApiController
*
* This endpoint deletes the given list of schedules.
*
* @authenticated
* @bodyParam schedules[0] string[] required The list of schedule Ids to delete. Example: 1234
* @bodyParam schedules[1] string[] required The list of schedule Ids to delete. Example: 5432
* @bodyParam schedules string[] required The list of schedule Ids to delete. Example: [1234, 5432]
*
* @param \Source\UseCases\Schedules\ScheduleDelete\ScheduleDeleteUseCase $scheduleDelete
* @return \Illuminate\Http\JsonResponse
...
...
@@ -219,7 +213,6 @@ class SchedulesController extends ApiController
* only doo