##// END OF EJS Templates
fix: removed change status dropdown for observers. Fixes: RCCE-171
ilin.s -
r5652:bb7b0319 default
parent child Browse files
Show More
@@ -39,6 +39,7 Fixes
39 - Fixed UI visualization issues with long commit messages
39 - Fixed UI visualization issues with long commit messages
40 - Fixed masking for some fields in admin settings
40 - Fixed masking for some fields in admin settings
41 - Fixed issues with caches calculations when passed search fields were empty
41 - Fixed issues with caches calculations when passed search fields were empty
42 - Fixed observer's ability to change a PR status
42
43
43 Upgrade notes
44 Upgrade notes
44 ^^^^^^^^^^^^^
45 ^^^^^^^^^^^^^
@@ -487,7 +487,9 class RepoPullRequestsView(RepoAppView,
487 c.pull_request_set_reviewers_data_json = ext_json.str_json(c.pull_request_set_reviewers_data_json)
487 c.pull_request_set_reviewers_data_json = ext_json.str_json(c.pull_request_set_reviewers_data_json)
488
488
489 # observers
489 # observers
490 observer_ids = []
490 for observer_obj, member in pull_request_at_ver.observers():
491 for observer_obj, member in pull_request_at_ver.observers():
492 observer_ids.append(observer_obj.user_id)
491 member_observer = h.reviewer_as_json(
493 member_observer = h.reviewer_as_json(
492 member, reasons=[], mandatory=False,
494 member, reasons=[], mandatory=False,
493 role=observer_obj.role,
495 role=observer_obj.role,
@@ -497,6 +499,7 class RepoPullRequestsView(RepoAppView,
497 c.pull_request_set_observers_data_json['observers'].append(member_observer)
499 c.pull_request_set_observers_data_json['observers'].append(member_observer)
498
500
499 c.pull_request_set_observers_data_json = ext_json.str_json(c.pull_request_set_observers_data_json)
501 c.pull_request_set_observers_data_json = ext_json.str_json(c.pull_request_set_observers_data_json)
502 c.status_change_disabled = self._rhodecode_user.user_id in observer_ids
500
503
501 general_comments, inline_comments = \
504 general_comments, inline_comments = \
502 self.register_comments_vars(c, pull_request_latest, versions)
505 self.register_comments_vars(c, pull_request_latest, versions)
@@ -1054,6 +1054,16 window.setObserversData = ${c.pull_reque
1054 new ReviewerPresenceController(channel)
1054 new ReviewerPresenceController(channel)
1055 // register globally so inject comment logic can re-use it.
1055 // register globally so inject comment logic can re-use it.
1056 window.commentsController = commentsController;
1056 window.commentsController = commentsController;
1057
1058 // hiding status change dropdown for observers
1059 const isHidden = ${'true' if c.status_change_disabled else 'false'};
1060
1061 if (isHidden) {
1062 const element = document.getElementById("s2id_change_status_general");
1063 if (element) {
1064 element.style.display = "none";
1065 }
1066 }
1057 })
1067 })
1058 </script>
1068 </script>
1059
1069
General Comments 0
You need to be logged in to leave comments. Login now