New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow locking network configuration #82
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,14 +79,24 @@ module.exports = { | |
// | ||
// Display network | ||
// | ||
// If set to false The Lounge will not expose network settings in login | ||
// form, limiting client to connect to the configured network. | ||
// If set to false network settings will not be shown in the login form. | ||
// | ||
// @type boolean | ||
// @default true | ||
// | ||
displayNetwork: true, | ||
|
||
// | ||
// Lock network | ||
// | ||
// If set to true, users will not be able to modify host, port and tls | ||
// settings and will be limited to the configured network. | ||
// | ||
// @type boolean | ||
// @default false | ||
// | ||
lockNetwork: false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of locking to the default, could we have an array of hostnames that we can lock to. Would allow people that want to allow multiple irc servers, but not just any random one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would require some restructuring, plus have a dropdown on the client show allowed servers. I'm not keen on doing that myself. |
||
|
||
// | ||
// Log settings | ||
// | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Very minor comments] For these 3 changes, could you choose either single or double quotes, rather than a mix of both? Also, you might want to do
'' %> >
or'' %>>
instead of''%>>
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable to me, to avoid the annoying escaping of the double-quotes for the HTML. This is consistent with what's already there. Double-quotes for Javascript expressions, single quotes for the HTML output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about that at first, but actually there is no need to escape here, unless I am being mistaken at that time of the day:
<%= typeof(lockNetwork) !== "undefined" && lockNetwork ? "disabled" : "" %>
seems to be fine to me.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(And actually, for checkboxes, no need to do
'checked="checked"'
,"checked"
would be enough here)