client/upload: force enable 'upload anonymously' for anon users
Fixes #425
This commit is contained in:
parent
be0c867d25
commit
f58079e12e
2 changed files with 4 additions and 1 deletions
|
@ -61,6 +61,7 @@
|
|||
text: 'Upload anonymously',
|
||||
name: 'anonymous',
|
||||
checked: ctx.uploadable.anonymous,
|
||||
readonly: ctx.uploadable.forceAnonymous,
|
||||
}) %>
|
||||
</div>
|
||||
<% } %>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
"use strict";
|
||||
|
||||
const events = require("../events.js");
|
||||
const api = require("../api.js");
|
||||
const views = require("../util/views.js");
|
||||
const FileDropperControl = require("../controls/file_dropper_control.js");
|
||||
|
||||
|
@ -34,7 +35,8 @@ class Uploadable extends events.EventTarget {
|
|||
this.flags = [];
|
||||
this.tags = [];
|
||||
this.relations = [];
|
||||
this.anonymous = false;
|
||||
this.anonymous = !api.isLoggedIn();
|
||||
this.forceAnonymous = !api.isLoggedIn();
|
||||
}
|
||||
|
||||
destroy() {}
|
||||
|
|
Loading…
Reference in a new issue