Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Sith
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
59
Issues
59
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AE
Sith
Commits
33d8c14d
Commit
33d8c14d
authored
Dec 23, 2016
by
Sli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
can_vote in Election
parent
2c767840
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
election/models.py
election/models.py
+6
-0
No files found.
election/models.py
View file @
33d8c14d
...
...
@@ -48,6 +48,12 @@ class Election(models.Model):
return
True
return
False
def
can_vote
(
self
,
user
):
for
group
in
self
.
vote_groups
.
all
():
if
user
.
is_in_group
(
group
):
return
True
return
False
# Permissions
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment