Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
relate
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
Model registry
Operate
Environments
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
Andreas Klöckner
relate
Commits
c12c9bbe
Commit
c12c9bbe
authored
8 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Advise about ineffective permissions for non-in-progress flows
parent
39e894ce
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
course/validation.py
+10
-0
10 additions, 0 deletions
course/validation.py
with
10 additions
and
0 deletions
course/validation.py
+
10
−
0
View file @
c12c9bbe
...
...
@@ -659,6 +659,16 @@ def validate_session_access_rule(vctx, location, arule, tags):
"
%s, permission %d
"
%
(
location
,
j
+
1
),
perm
)
if
hasattr
(
arule
,
"
if_in_progress
"
)
and
not
arule
.
if_in_progress
:
from
course.constants
import
flow_permission
if
(
flow_permission
.
submit_answer
in
arule
.
permissions
or
flow_permission
.
end_session
in
arule
.
permissions
):
vctx
.
add_warning
(
location
,
_
(
"
Rule specifies
'
submit_answer
'
or
'
end_session
'
"
"
permissions for non-in-progress flow. These
"
"
permissions will be ignored.
"
))
def
validate_session_grading_rule
(
vctx
,
# type: ValidationContext
...
...
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