FIX: Use can_assign instead of staff to show the assign modal correctly

FIX: Use can_assign instead of staff to show the assign modal correctly

diff --git a/assets/javascripts/discourse-assign/initializers/extend-for-assigns.js.es6 b/assets/javascripts/discourse-assign/initializers/extend-for-assigns.js.es6
index 9e3c4c6..724afc8 100644
--- a/assets/javascripts/discourse-assign/initializers/extend-for-assigns.js.es6
+++ b/assets/javascripts/discourse-assign/initializers/extend-for-assigns.js.es6
@@ -25,7 +25,7 @@ function registerTopicFooterButtons(api) {
       return `discourse_assign.${hasAssignement ? "unassign" : "assign"}.title`;
     },
     action() {
-      if (!this.get("currentUser.staff")) {
+      if (!this.get("currentUser.can_assign")) {
         return;
       }
 
@@ -47,7 +47,7 @@ function registerTopicFooterButtons(api) {
     dependentKeys: [
       "topic.isPrivateMessage",
       "topic.assigned_to_user",
-      "currentUser.staff",
+      "currentUser.can_assign",
       "topic.assigned_to_user.username"
     ],
     displayed() {

GitHub sha: 2d781514

1 Like