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
!694
Resolve "Improve rule-checking efficiency"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Improve rule-checking efficiency"
491-improve-rule-checking-efficiency
into
master
Overview
2
Commits
3
Pipelines
7
Changes
2
All threads resolved!
Show all comments
Merged
Hangzhi Yu
requested to merge
491-improve-rule-checking-efficiency
into
master
3 years ago
Overview
2
Commits
3
Pipelines
7
Changes
2
All threads resolved!
Show all comments
Expand
Closes
#491 (closed)
Edited
3 years ago
by
Nik | Klampfradler
0
0
Merge request reports
Compare
master
version 5
b44e50af
3 years ago
version 4
e8701ac0
3 years ago
version 3
09dbdbe0
3 years ago
version 2
e8701ac0
3 years ago
version 1
5ac3ec6a
3 years ago
master (base)
and
version 2
latest version
3ab1487b
3 commits,
3 years ago
version 5
b44e50af
2 commits,
3 years ago
version 4
e8701ac0
2 commits,
3 years ago
version 3
09dbdbe0
1 commit,
3 years ago
version 2
e8701ac0
2 commits,
3 years ago
version 1
5ac3ec6a
1 commit,
3 years ago
2 files
+
5
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
aleksis/core/util/predicates.py
+
4
−
0
Options
@@ -75,6 +75,10 @@ def has_any_object(perm: str, klass):
Build predicate which checks whether a user has access
to objects with the provided permission or rule.
Differentiates between object-related permissions and rules.
In case a object-related permissions with the same ContentType class
as the given class is passed, the optimized django-guardian get_objects_for_user function
is used.
"""
name
=
f
"
has_any_object:
{
perm
}
"
Loading