class Meta: queryset = Team.objects.all() list_allowed_methods = ['get', 'post', 'put', 'delete'] authentication = ScrumDoAuthentication() authorization = ScrumDoAuthorization( lambda u: Q(organization__id__in=u.teams.all().values( 'organization__id').distinct()), lambda u: Q(organization__id__in=u.teams.filter( access_type="admin").values('organization__id').distinct()))
class Meta: queryset = Iteration.objects.all() fields = ['id', 'name', 'start_date', 'end_date', 'project_id'] list_allowed_methods = ['get', 'post', 'put', 'delete'] authentication = ScrumDoAuthentication() authorization = ScrumDoAuthorization( lambda u: Q(project__teams__in=u.teams.all()) | Q( project__member_users__in=[u]), lambda u: Q(project__teams__in=u.teams.filter( Q(access_type="read/write") | Q(access_type="admin"))) | Q( project__member_users__in=[u]))
class Meta: queryset = Task.objects.all() fields = ['id', 'summary', 'complete', 'order'] list_allowed_methods = ['get', 'post', 'put', 'delete'] authentication = ScrumDoAuthentication() authorization = ScrumDoAuthorization( lambda u: Q(story__project__teams__in=u.teams.all()) | Q( story__project__member_users__in=[u]), lambda u: Q(story__project__teams__in=u.teams.filter( Q(access_type="read/write") | Q(access_type="admin"))) | Q( story__project__member_users__in=[u]))
class Meta: queryset = Project.objects.all() fields = [ 'name', 'slug', 'creator_id', 'organization_id', 'velocity', 'iterations_left', 'get_num_stories' ] list_allowed_methods = ['get', 'post', 'put', 'delete'] authentication = ScrumDoAuthentication() authorization = ScrumDoAuthorization( lambda u: Q(teams__in=u.teams.all()) | Q(member_users__in=[u]), lambda u: Q(teams__in=u.teams.filter( Q(access_type="read/write") | Q(access_type="admin"))) | Q( member_users__in=[u]))
class Meta: queryset = Epic.objects.all() fields = [ 'id', 'summary', 'detail', 'points', 'project_id', 'parent_id', 'status', 'order', 'archived', 'local_id' ] list_allowed_methods = ['get', 'post', 'put', 'delete'] authentication = ScrumDoAuthentication() authorization = ScrumDoAuthorization( lambda u: Q(project__teams__in=u.teams.all()) | Q( project__member_users__in=[u]), lambda u: Q(project__teams__in=u.teams.filter( Q(access_type="read/write") | Q(access_type="admin"))) | Q( project__member_users__in=[u]))
class Meta: queryset = Story.objects.all() fields = [ 'id', 'summary', 'detail', 'assignee_id', 'points', 'iteration_id', 'project_id', 'status', 'extra_1', 'extra_2', 'extra_3' ] list_allowed_methods = [] authentication = ScrumDoAuthentication() authorization = ScrumDoAuthorization( lambda u: Q(project__teams__in=u.teams.all()) | Q( project__member_users__in=[u]), lambda u: Q(project__teams__in=u.teams.filter( Q(access_type="read/write") | Q(access_type="admin"))) | Q( project__member_users__in=[u]))
class Meta: queryset = User.objects.all() fields = ['username', 'first_name', 'last_name', 'last_login'] detail_allowed_methods = ['get'] list_allowed_methods = [] authentication = ScrumDoAuthentication()
class Meta: fields = ['created', 'text', 'icon', 'user'] resource_name = "news" queryset = NewsItem.objects.all() authentication = ScrumDoAuthentication()
class Meta: queryset = Activity.objects.all() authentication = ScrumDoAuthentication()