OpenSlides/server/openslides/assignments/access_permissions.py
Sean b5cb694fc7 Allow negative voting
Adds "no" as the opposite of "votes" as assignment poll method
Added global_yes, enabled new voting mode `N` in the server
Layout, Tables, Charts, Projector, Vote CSS, Cleanups, Percent bases,
analog votes and more
2020-11-24 23:14:12 +01:00

35 lines
999 B
Python

from ..poll.access_permissions import (
BaseOptionAccessPermissions,
BasePollAccessPermissions,
BaseVoteAccessPermissions,
)
from ..utils.access_permissions import BaseAccessPermissions
class AssignmentAccessPermissions(BaseAccessPermissions):
"""
Access permissions container for Assignment and AssignmentViewSet.
"""
base_permission = "assignments.can_see"
class AssignmentPollAccessPermissions(BasePollAccessPermissions):
base_permission = "assignments.can_see"
manage_permission = "assignments.can_manage"
additional_fields = [
"amount_global_yes",
"amount_global_no",
"amount_global_abstain",
]
class AssignmentOptionAccessPermissions(BaseOptionAccessPermissions):
base_permission = "assignments.can_see"
manage_permission = "assignments.can_manage"
class AssignmentVoteAccessPermissions(BaseVoteAccessPermissions):
base_permission = "assignments.can_see"
manage_permission = "assignments.can_manage"