Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
thomasDOTwtf
hub
Commits
3188b960
Commit
3188b960
authored
9 months ago
by
Roang
Browse files
Options
Downloads
Patches
Plain Diff
Fix permission names
parent
f809e1e5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/backoffice/views/mixins.py
+2
-2
2 additions, 2 deletions
src/backoffice/views/mixins.py
src/core/models/assemblies.py
+1
-1
1 addition, 1 deletion
src/core/models/assemblies.py
with
3 additions
and
3 deletions
src/backoffice/views/mixins.py
+
2
−
2
View file @
3188b960
...
@@ -181,13 +181,13 @@ class AssemblyMixin(ConferenceLoginRequiredMixin):
...
@@ -181,13 +181,13 @@ class AssemblyMixin(ConferenceLoginRequiredMixin):
assembly
=
Assembly
.
objects
.
get
(
conference
=
self
.
conference
,
pk
=
self
.
request
.
resolver_match
.
kwargs
.
get
(
self
.
assembly_url_param
))
assembly
=
Assembly
.
objects
.
get
(
conference
=
self
.
conference
,
pk
=
self
.
request
.
resolver_match
.
kwargs
.
get
(
self
.
assembly_url_param
))
# check if it's the assembly team
# check if it's the assembly team
if
self
.
conferencemember
.
has_perms
(
'
assembly_team
'
,
require_staff
=
True
):
if
self
.
conferencemember
.
has_perms
(
'
core.
assembly_team
'
,
require_staff
=
True
):
self
.
_assembly_staff_access
=
True
self
.
_assembly_staff_access
=
True
self
.
_staff_access
=
self
.
_staff_access
or
assembly
.
state_assembly
!=
Assembly
.
State
.
NONE
self
.
_staff_access
=
self
.
_staff_access
or
assembly
.
state_assembly
!=
Assembly
.
State
.
NONE
self
.
_staff_mode
=
True
self
.
_staff_mode
=
True
# check if it's the channel team
# check if it's the channel team
if
self
.
conferencemember
.
has_perms
(
'
channel_team
'
,
require_staff
=
True
):
if
self
.
conferencemember
.
has_perms
(
'
core.
channel_team
'
,
require_staff
=
True
):
self
.
_channels_staff_access
=
True
self
.
_channels_staff_access
=
True
self
.
_staff_access
=
self
.
_staff_access
or
assembly
.
state_channel
!=
Assembly
.
State
.
NONE
self
.
_staff_access
=
self
.
_staff_access
or
assembly
.
state_channel
!=
Assembly
.
State
.
NONE
self
.
_staff_mode
=
True
self
.
_staff_mode
=
True
...
...
This diff is collapsed.
Click to expand it.
src/core/models/assemblies.py
+
1
−
1
View file @
3188b960
...
@@ -402,7 +402,7 @@ class Assembly(TaggedItemMixin, models.Model):
...
@@ -402,7 +402,7 @@ class Assembly(TaggedItemMixin, models.Model):
if
not
user
.
is_authenticated
:
if
not
user
.
is_authenticated
:
return
False
return
False
if
staff_can_manage
and
user
.
has_conference_staff_permission
(
self
.
conference
,
'
assembly_team
'
,
'
channel_team
'
):
if
staff_can_manage
and
user
.
has_conference_staff_permission
(
self
.
conference
,
'
core.
assembly_team
'
,
'
core.
channel_team
'
):
return
True
return
True
return
self
.
members
.
filter
(
member
=
user
,
can_manage_assembly
=
True
).
exists
()
return
self
.
members
.
filter
(
member
=
user
,
can_manage_assembly
=
True
).
exists
()
...
...
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