FEATURE: Allow turning off the plugin from settings
This commit is contained in:
parent
1b895a9917
commit
c16bf207c7
|
@ -17,7 +17,7 @@ function initialize(api, container) {
|
|||
_createContent() {
|
||||
this._super();
|
||||
|
||||
if (!this.get('currentUser.staff')) {
|
||||
if (!this.get('currentUser.staff') || !siteSettings.assign_enabled) {
|
||||
return;
|
||||
}
|
||||
const content = this.get('content');
|
||||
|
@ -75,7 +75,7 @@ function initialize(api, container) {
|
|||
|
||||
});
|
||||
|
||||
if (currentUser && currentUser.get("staff")) {
|
||||
if (currentUser && currentUser.get("staff") && siteSettings.assign_enabled) {
|
||||
api.addUserMenuGlyph({
|
||||
label: 'discourse_assign.assigned',
|
||||
className: 'assigned',
|
|
@ -1,5 +1,6 @@
|
|||
en:
|
||||
site_settings:
|
||||
assign_enabled: "Enable the assign plugin"
|
||||
assigns_public: "Allow general public to see topic assignments"
|
||||
assigns_user_url_path: "Path to users assigned topics (use: {username} to substitute username)"
|
||||
assigns_by_staff_mention: "If a staff member mentions another staff member, topic is automatically assigned"
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
plugins:
|
||||
assign_enabled:
|
||||
default: false
|
||||
client: true
|
||||
assigns_by_staff_mention: false
|
||||
unassign_creates_tracking_post: true
|
||||
assigns_public: false
|
||||
|
|
Loading…
Reference in New Issue