[Backport] Add owner to the read-only fields on issues, tasks, wiki pages and user stories
parent
4c8a515004
commit
bcb8f4d0ed
|
@ -46,7 +46,7 @@ class IssueSerializer(WatchersValidator, VoteResourceSerializerMixin, EditableWa
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = models.Issue
|
model = models.Issue
|
||||||
read_only_fields = ('id', 'ref', 'created_date', 'modified_date')
|
read_only_fields = ('id', 'ref', 'created_date', 'modified_date', 'owner')
|
||||||
|
|
||||||
def get_comment(self, obj):
|
def get_comment(self, obj):
|
||||||
# NOTE: This method and field is necessary to historical comments work
|
# NOTE: This method and field is necessary to historical comments work
|
||||||
|
|
|
@ -50,7 +50,7 @@ class TaskSerializer(WatchersValidator, VoteResourceSerializerMixin, EditableWat
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = models.Task
|
model = models.Task
|
||||||
read_only_fields = ('id', 'ref', 'created_date', 'modified_date')
|
read_only_fields = ('id', 'ref', 'created_date', 'modified_date', 'owner')
|
||||||
|
|
||||||
def get_comment(self, obj):
|
def get_comment(self, obj):
|
||||||
return ""
|
return ""
|
||||||
|
|
|
@ -67,7 +67,7 @@ class UserStorySerializer(WatchersValidator, VoteResourceSerializerMixin, Editab
|
||||||
class Meta:
|
class Meta:
|
||||||
model = models.UserStory
|
model = models.UserStory
|
||||||
depth = 0
|
depth = 0
|
||||||
read_only_fields = ('created_date', 'modified_date')
|
read_only_fields = ('created_date', 'modified_date', 'owner')
|
||||||
|
|
||||||
def get_total_points(self, obj):
|
def get_total_points(self, obj):
|
||||||
return obj.get_total_points()
|
return obj.get_total_points()
|
||||||
|
|
|
@ -30,7 +30,7 @@ class WikiPageSerializer(WatchersValidator, WatchedResourceModelSerializer, seri
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = models.WikiPage
|
model = models.WikiPage
|
||||||
read_only_fields = ('modified_date', 'created_date')
|
read_only_fields = ('modified_date', 'created_date', 'owner')
|
||||||
|
|
||||||
def get_html(self, obj):
|
def get_html(self, obj):
|
||||||
return mdrender(obj.project, obj.content)
|
return mdrender(obj.project, obj.content)
|
||||||
|
|
Loading…
Reference in New Issue