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
38737859
Commit
38737859
authored
Oct 16, 2020
by
Jacob Priddy
👌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add group number for more helpful messages
parent
5abd428c
Pipeline
#12942
failed with stages
in 1 minute and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/backend/src/UseCases/Door/Access/Authorizers/ScheduleAuthorizer.php
...c/UseCases/Door/Access/Authorizers/ScheduleAuthorizer.php
+5
-3
No files found.
src/backend/src/UseCases/Door/Access/Authorizers/ScheduleAuthorizer.php
View file @
38737859
...
...
@@ -30,7 +30,8 @@ class ScheduleAuthorizer implements AccessAuthorizer
*/
protected
GroupScheduleRepository
$groupSchedule
;
protected
int
$allowedSchedule
=
0
;
protected
string
$acceptedSchedule
=
0
;
protected
string
$acceptedGroup
=
0
;
public
function
__construct
(
GroupScheduleRepository
$groupSchedule
,
...
...
@@ -65,7 +66,8 @@ class ScheduleAuthorizer implements AccessAuthorizer
}
if
(
$this
->
recurrenceSet
->
occurrenceHappeningAtDate
(
$date
,
$schedule
->
getDuration
()))
{
$this
->
allowedSchedule
=
$schedule
->
getId
();
$this
->
acceptedSchedule
=
$schedule
->
getId
();
$this
->
acceptedGroup
=
$group
->
getId
();
return
self
::
ALLOW
;
}
}
...
...
@@ -81,6 +83,6 @@ class ScheduleAuthorizer implements AccessAuthorizer
public
function
getReason
():
string
{
// We only allow, can only be one reason.
return
'Allowed
by user access schedule: '
.
$this
->
allow
edSchedule
;
return
'Allowed
through group '
.
$this
->
acceptedGroup
.
' via schedule '
.
$this
->
accept
edSchedule
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment