-
Notifications
You must be signed in to change notification settings - Fork 0
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
[GSoC19] Articles improvements #7
base: articles
Are you sure you want to change the base?
Conversation
Can we remove the files |
Can you please add |
app/articles/server/settings.js
Outdated
import { settings } from '../../settings'; | ||
|
||
const defaults = { | ||
enable: false, |
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.
Why is it kept inside a dict, and the dict a separate variable as we just this value at one place and directly? Can we directly use this value instead?
app/articles/server/settings.js
Outdated
public: true, | ||
}); | ||
|
||
this.add('Article_Site_title', 'Rocket.Chat', { |
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.
Article_Site_title
> Article_Site_Title
app/articles/server/settings.js
Outdated
|
||
Meteor.startup(() => { | ||
settings.addGroup('Articles', function() { | ||
this.add('Articles_enabled', defaults.enable, { |
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.
Articles_enabled
> Articles_Enabled
, here and in enableQuery below
app/articles/server/settings.js
Outdated
public: true, | ||
}); | ||
|
||
this.add('Articles_admin_panel', 'Articles_admin_panel', { |
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.
Articles_admin_panel
> Articles_Admin_Panel
Also, if we can add some description for this and others above, it would be nice.
client/importPackages.js
Outdated
@@ -108,3 +108,4 @@ import '../app/ui-cached-collection'; | |||
import '../app/action-links'; | |||
import '../app/reactions/client'; | |||
import '../app/livechat/client'; | |||
import '../app/articles/client'; |
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.
Can we remove it as we are not using it?
@@ -111,6 +111,24 @@ export const getActions = ({ user, directActions, hideAdminControls }) => { | |||
}, | |||
}, | |||
|
|||
{ | |||
icon: 'articles', |
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.
UX question, should we show this button is user's account is not on ghost?
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.
If we do this, and store and maintain a state in user objects > ghostAccountExists,,.. then this can simply be a link and the corresponding meteor method is not required.
@@ -33,7 +33,7 @@ const mentionMessage = (rid, { _id, username, name }, message_embedded) => { | |||
return Messages.insert(welcomeMessage); | |||
}; | |||
|
|||
const create = ({ prid, pmid, t_name, reply, users }) => { | |||
const create = ({ prid, pmid, t_name, reply, t, users }) => { |
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.
Discuss with the team and re-evaluate, weather to implement comments this way.
(allowing public child of a private parent room)
|
||
const api = new API(); | ||
|
||
export const triggerHandler = new class ArticlesSettingsHandler { |
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.
Refactor it to use ghostClient
enableCors: true, | ||
apiPath: 'ghooks/', | ||
auth: { | ||
user() { |
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.
Add rate-limiting, to prevent brute force
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.
Integrations also don't have any rate-limit, should I add it here. 🤔
import { settings } from '../../../settings'; | ||
import * as Models from '../../../models'; | ||
|
||
const Api = new Restivus({ |
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.
Note: Revisit the security
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.
Apart from token checking, what else I have to check?
Changed as requested. @kb0304 |
This PR adds:
ff9eea8
NOTE: This PR contains commits from all the PRs, merge this after reviewing all the PRs.