Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
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
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
9d83d520
Commit
9d83d520
authored
7 years ago
by
Luke Barnard
Browse files
Options
Downloads
Patches
Plain Diff
Use a generator instead of a list
parent
5b48eec4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/appservice/__init__.py
+2
-2
2 additions, 2 deletions
synapse/appservice/__init__.py
with
2 additions
and
2 deletions
synapse/appservice/__init__.py
+
2
−
2
View file @
9d83d520
...
...
@@ -275,11 +275,11 @@ class ApplicationService(object):
def
get_groups_for_user
(
self
,
user_id
):
"""
Get the groups that this user is associated with by this AS
"""
return
[
return
(
regex_obj
[
"
group_id
"
]
for
regex_obj
in
self
.
namespaces
[
ApplicationService
.
NS_USERS
]
if
"
group_id
"
in
regex_obj
and
regex_obj
[
"
regex
"
].
match
(
user_id
)
]
)
def
is_rate_limited
(
self
):
return
self
.
rate_limited
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment