forked from rapidpro/rapidpro
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make teams an org feature.. that nobody has for now
- Loading branch information
1 parent
a7dcb61
commit 9d00908
Showing
5 changed files
with
42 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
|
||
from temba.msgs.models import Msg | ||
from temba.notifications.views import NotificationTargetMixin | ||
from temba.orgs.models import Org | ||
from temba.orgs.views.base import ( | ||
BaseCreateModal, | ||
BaseDeleteModal, | ||
|
@@ -21,7 +22,7 @@ | |
BaseMenuView, | ||
BaseUpdateModal, | ||
) | ||
from temba.orgs.views.mixins import OrgObjPermsMixin, OrgPermsMixin | ||
from temba.orgs.views.mixins import OrgObjPermsMixin, OrgPermsMixin, RequireFeatureMixin | ||
from temba.utils.dates import datetime_to_timestamp, timestamp_to_datetime | ||
from temba.utils.export import response_from_workbook | ||
from temba.utils.fields import InputWidget | ||
|
@@ -112,7 +113,8 @@ class TeamCRUDL(SmartCRUDL): | |
model = Team | ||
actions = ("create", "update", "delete", "list") | ||
|
||
class Create(BaseCreateModal): | ||
class Create(RequireFeatureMixin, BaseCreateModal): | ||
require_feature = Org.FEATURE_TEAMS | ||
form_class = TeamForm | ||
success_url = "@tickets.team_list" | ||
|
||
|
@@ -127,7 +129,8 @@ class Delete(BaseDeleteModal): | |
cancel_url = "[email protected]_team" | ||
redirect_url = "@tickets.team_list" | ||
|
||
class List(ContextMenuMixin, BaseListView): | ||
class List(RequireFeatureMixin, ContextMenuMixin, BaseListView): | ||
require_feature = Org.FEATURE_TEAMS | ||
menu_path = "/settings/teams" | ||
|
||
def derive_queryset(self, **kwargs): | ||
|