Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
teknikattan-scoring-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tddd96-grupp1
teknikattan-scoring-system
Merge requests
!115
Resolve "Add authorization to socketio"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Add authorization to socketio"
145-add-authorization-to-socketio
into
dev
Overview
0
Commits
10
Pipelines
4
Changes
1
Merged
Albin Henriksson
requested to merge
145-add-authorization-to-socketio
into
dev
3 years ago
Overview
0
Commits
10
Pipelines
4
Changes
1
Expand
Closes
#145 (closed)
Closes
#81 (closed)
Edited
3 years ago
by
Victor Löfgren
0
0
Merge request reports
Viewing commit
2b9fbd0f
Prev
Next
Show latest version
1 file
+
1
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
2b9fbd0f
add: protected route for sockets
· 2b9fbd0f
robban64
authored
3 years ago
server/app/core/sockets.py
+
1
−
1
Options
@@ -39,7 +39,7 @@ def protect_route(allowed_views=None):
claims
=
get_jwt_claims
()
view
=
claims
.
get
(
"
view
"
)
if
not
_is_allowed
(
allowed_views
,
view
):
logger
.
warning
(
f
"
View
{
view
}
is not allowed to access route only accessible by
{
allowed_views
}
"
)
logger
.
warning
(
f
"
View
'
{
view
}
'
is not allowed to access route only accessible by
'
{
allowed_views
}
'
"
)
return
return
func
(
*
args
,
**
kwargs
)
Loading