Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
steering
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
AURA
steering
Commits
383f2db8
Verified
Commit
383f2db8
authored
11 months ago
by
Ernesto Rico Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
fix: refer to permissions with program prefix
parent
74376313
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#7792
passed
11 months ago
Stage: build
Stage: test
Stage: deploy
Stage: release
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
program/serializers.py
+1
-1
1 addition, 1 deletion
program/serializers.py
program/views.py
+1
-1
1 addition, 1 deletion
program/views.py
with
2 additions
and
2 deletions
program/serializers.py
+
1
−
1
View file @
383f2db8
...
...
@@ -635,7 +635,7 @@ class ShowSerializer(serializers.HyperlinkedModelSerializer):
raise
exceptions
.
PermissionDenied
(
detail
=
"
You are not allowed to update this show.
"
)
# without the update_show permission, fields without edit permission are not allowed
if
not
user
.
has_perm
(
"
update_show
"
)
and
(
if
not
user
.
has_perm
(
"
program.
update_show
"
)
and
(
not_allowed
:
=
update_fields
.
difference
(
user_permissions
)
):
detail
=
{
field
:
"
You are not allowed to edit this field
"
for
field
in
not_allowed
}
...
...
This diff is collapsed.
Click to expand it.
program/views.py
+
1
−
1
View file @
383f2db8
...
...
@@ -724,7 +724,7 @@ class APINoteViewSet(
user
=
self
.
request
.
user
if
self
.
request
.
method
in
permissions
.
SAFE_METHODS
or
user
.
has_perm
(
"
update_note
"
):
if
self
.
request
.
method
in
permissions
.
SAFE_METHODS
or
user
.
has_perm
(
"
program.
update_note
"
):
return
Note
.
objects
.
all
()
else
:
return
Note
.
objects
.
filter
(
timeslot__schedule__show__owners
=
user
)
...
...
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