Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nk20
Manage
Activity
Members
Labels
Plan
Issues
31
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
8ad464ae
Commit
8ad464ae
authored
4 years ago
by
ynerant
Browse files
Options
Downloads
Patches
Plain Diff
Fix CI
parent
5c9c0bbc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!71
Memberships
Pipeline
#8085
passed with stages
Stage: test
Stage: quality-assurance
in 3 minutes and 28 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/permission/backends.py
+2
-2
2 additions, 2 deletions
apps/permission/backends.py
apps/permission/decorators.py
+1
-1
1 addition, 1 deletion
apps/permission/decorators.py
with
3 additions
and
3 deletions
apps/permission/backends.py
+
2
−
2
View file @
8ad464ae
...
...
@@ -10,8 +10,8 @@ from django.db.models import Q, F
from
note.models
import
Note
,
NoteUser
,
NoteClub
,
NoteSpecial
from
note_kfet.middlewares
import
get_current_session
from
member.models
import
Membership
,
Club
from
.decorators
import
memoize
from
.decorators
import
memoize
from
.models
import
Permission
...
...
@@ -43,7 +43,7 @@ class PermissionBackend(ModelBackend):
rolepermissions__role__membership__date_end__gte
=
datetime
.
date
.
today
(),
type
=
t
,
mask__rank__lte
=
get_current_session
().
get
(
"
permission_mask
"
,
0
),
).
distinct
(
'
club
'
,
'
pk
'
)
).
distinct
(
'
club
'
,
'
pk
'
,
)
@staticmethod
def
permissions
(
user
,
model
,
type
):
...
...
This diff is collapsed.
Click to expand it.
apps/permission/decorators.py
+
1
−
1
View file @
8ad464ae
...
...
@@ -53,4 +53,4 @@ def memoize(f):
func
.
func_name
=
f
.
__name__
return
func
\ No newline at end of file
return
func
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