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
Commits
087790b3
Verified
Commit
087790b3
authored
3 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Check permission for action in action form
parent
1367b8fb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!996
Improve actionform
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/core/forms.py
+6
-1
6 additions, 1 deletion
aleksis/core/forms.py
with
6 additions
and
1 deletion
aleksis/core/forms.py
+
6
−
1
View file @
087790b3
...
...
@@ -39,7 +39,7 @@ from .registries import (
site_preferences_registry
,
)
from
.util.auth_helpers
import
AppScopes
from
.util.core_helpers
import
get_site_preferences
from
.util.core_helpers
import
get_site_preferences
,
queryset_rules_filter
class
PersonForm
(
ExtensibleForm
):
...
...
@@ -730,8 +730,13 @@ class ActionForm(forms.Form):
if
self
.
is_valid
():
data
=
self
.
cleaned_data
[
"
selected_objects
"
]
action
=
self
.
_get_actions_dict
()[
self
.
cleaned_data
[
"
action
"
]]
if
hasattr
(
action
,
"
permission
"
):
data
=
queryset_rules_filter
(
self
.
request
,
data
,
action
.
permission
)
action
(
None
,
self
.
request
,
data
)
return
True
return
False
...
...
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