DEV: Stop overriding computed property on `models/category.js.es6`

DEV: Stop overriding computed property on models/category.js.es6

This causes an Ember deprecation notice, and is a confusing pattern. We never used the default values, so there is no benefit to including them.

diff --git a/app/assets/javascripts/discourse/models/category.js.es6 b/app/assets/javascripts/discourse/models/category.js.es6
index 5b663c48a0..8f53b70f5d 100644
--- a/app/assets/javascripts/discourse/models/category.js.es6
+++ b/app/assets/javascripts/discourse/models/category.js.es6
@@ -5,6 +5,8 @@ import { on } from "ember-addons/ember-computed-decorators";
 import PermissionType from "discourse/models/permission-type";
 
 const Category = RestModel.extend({
+  permissions: null,
+
   @on("init")
   setupGroupsAndPermissions() {
     const availableGroups = this.available_groups;
@@ -161,15 +163,6 @@ const Category = RestModel.extend({
     this.availableGroups.addObject(permission.group_name);
   },
 
-  @computed
-  permissions() {
-    return Ember.A([
-      { group_name: "everyone", permission: PermissionType.create({ id: 1 }) },
-      { group_name: "admins", permission: PermissionType.create({ id: 2 }) },
-      { group_name: "crap", permission: PermissionType.create({ id: 3 }) }
-    ]);
-  },
-
   @computed("topics")
   latestTopic(topics) {
     if (topics && topics.length) {

GitHub sha: 392f6cdf

1 Like

This commit has been mentioned on Discourse Meta. There might be relevant details there: