Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nk20
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
BDE
nk20
Commits
4c29d855
Commit
4c29d855
authored
4 years ago
by
ynerant
Browse files
Options
Downloads
Patches
Plain Diff
Fix RolePermissions merge
parent
55bc288d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!86
Pre-beta fixes
Pipeline
#8244
passed with stages
in 3 minutes and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/permission/backends.py
+5
-5
5 additions, 5 deletions
apps/permission/backends.py
with
5 additions
and
5 deletions
apps/permission/backends.py
+
5
−
5
View file @
4c29d855
...
...
@@ -37,17 +37,17 @@ class PermissionBackend(ModelBackend):
return
Permission
.
objects
.
none
()
qs
=
Permission
.
objects
.
annotate
(
club
=
F
(
"
role__
role__
membership__club
"
),
membership
=
F
(
"
role__
role__
membership
"
),
club
=
F
(
"
role__membership__club
"
),
membership
=
F
(
"
role__membership
"
),
).
filter
(
(
Q
(
role__
role__membership__date_start__lte
=
timezone
.
now
().
today
(),
role__
role__membership__date_end__gte
=
timezone
.
now
().
today
(),
role__membership__date_start__lte
=
timezone
.
now
().
today
(),
role__membership__date_end__gte
=
timezone
.
now
().
today
(),
)
|
Q
(
permanent
=
True
)
)
&
Q
(
role__
role__
membership__user
=
user
)
&
Q
(
role__membership__user
=
user
)
&
Q
(
type
=
t
)
&
Q
(
mask__rank__lte
=
get_current_session
().
get
(
"
permission_mask
"
,
0
))
)
...
...
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