Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
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
AlekSIS®
Official
AlekSIS-Core
Merge requests
!799
Resolve "[OAuth] Allow apps to generate claims for their own scopes"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "[OAuth] Allow apps to generate claims for their own scopes"
553-oauth-allow-apps-to-generate-claims-for-their-own-scopes
into
master
Overview
0
Commits
6
Pipelines
5
Changes
4
Merged
Nik | Klampfradler
requested to merge
553-oauth-allow-apps-to-generate-claims-for-their-own-scopes
into
master
3 years ago
Overview
0
Commits
6
Pipelines
5
Changes
4
Expand
Closes
#553 (closed)
Edited
3 years ago
by
Nik | Klampfradler
0
0
Merge request reports
Compare
master
version 4
4a6650c9
3 years ago
version 3
79003e07
3 years ago
version 2
a41d1d72
3 years ago
version 1
a41d1d72
3 years ago
master (base)
and
latest version
latest version
6670cb81
6 commits,
3 years ago
version 4
4a6650c9
5 commits,
3 years ago
version 3
79003e07
2 commits,
3 years ago
version 2
a41d1d72
2 commits,
3 years ago
version 1
a41d1d72
4 commits,
3 years ago
4 files
+
65
−
44
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
aleksis/core/util/apps.py
+
6
−
0
Options
@@ -8,6 +8,7 @@ from django.http import HttpRequest
from
dynamic_preferences.signals
import
preference_updated
from
license_expression
import
Licensing
from
oauthlib.common
import
Request
as
OauthlibRequest
from
spdx_license_list
import
LICENSES
from
.core_helpers
import
copyright_years
@@ -244,6 +245,11 @@ class AppConfig(django.apps.AppConfig):
"""
Return a list of all OAuth scopes to always include for this request and application.
"""
return
[]
@classmethod
def
get_additional_claims
(
cls
,
scopes
:
list
[
str
],
request
:
OauthlibRequest
)
->
dict
[
str
,
Any
]:
"""
Get claim data for requested scopes.
"""
return
{}
def
_maintain_default_data
(
self
):
from
django.contrib.auth.models
import
Permission
from
django.contrib.contenttypes.models
import
ContentType
Loading