Skip to content
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

[IMPROVE] Add option to require authentication on user's shield endpoint #16845

Merged
merged 3 commits into from
Mar 12, 2020

Conversation

MarcosSpessatto
Copy link
Member

No description provided.

@@ -88,6 +88,10 @@ API.v1.addRoute('shield.svg', { authRequired: false, rateLimiterOptions: { numRe
text = `#${ channel }`;
break;
case 'user':
const loggedUser = this.getLoggedInUser();
if (settings.get('API_Shield_Require_Login_To_Search_For_Users') && !loggedUser) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (settings.get('API_Shield_Require_Login_To_Search_For_Users') && !loggedUser) {
if (settings.get('API_Shield_user_require_auth') && !loggedUser) {

@@ -335,6 +335,7 @@
"API_Personal_Access_Tokens_Regenerate_It": "Regenerate token",
"API_Shield_Types": "Shield Types",
"API_Shield_Types_Description": "Types of shields to enable as a comma separated list, choose from `online`, `channel` or `*` for all",
"API_Shield_Require_Login_To_Search_For_Users": "Require login to search for users",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"API_Shield_Require_Login_To_Search_For_Users": "Require login to search for users",
"API_Shield_user_require_auth": "Require authentication for user shields",

@@ -325,6 +325,7 @@
"API_Personal_Access_Tokens_Regenerate_It": "Renovar código",
"API_Shield_Types": "Tipos de escudo",
"API_Shield_Types_Description": "Tipos de escudos para habilitar como uma lista separada por vírgulas, escolha entre \"on-line\", \"canal\" ou \"*\" para todos",
"API_Shield_Require_Login_To_Search_For_Users": "Exigir Login para pesquisar por usuários",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"API_Shield_Require_Login_To_Search_For_Users": "Exigir Login para pesquisar por usuários",
"API_Shield_user_require_auth": "Exigir autenticação para escudos de usuários",

app/api/server/v1/misc.js Outdated Show resolved Hide resolved
Co-Authored-By: Diego Sampaio <chinello@gmail.com>
@sampaiodiego sampaiodiego changed the title [IMPROVE] Require authentication on shield endpoint if user requests for users info [IMPROVE] Add option to require authentication on user's shield endpoint Mar 12, 2020
@sampaiodiego sampaiodiego merged commit ee85516 into develop Mar 12, 2020
@sampaiodiego sampaiodiego deleted the fix-shield-endpoint branch March 12, 2020 23:46
gabriellsh added a commit that referenced this pull request Mar 13, 2020
…exact_search

* 'develop' of github.com:RocketChat/Rocket.Chat: (178 commits)
  [IMPROVE] Add option to require authentication on user's shield endpoint (#16845)
  [FIX] Custom OAuth Bug (#16811)
  [FIX] Integrations page pagination (#16838)
  fix: livechat/facebook missing visitor data after registerGuest (#16810)
  [FIX] Invite links counting users already joined (#16591)
  [FIX] No settings to be displayed if search not found (#16255)
  [FIX] Removed some hardcoded texts (#16304)
  [FIX] Cannot unfollow message from thread's panel (#16560)
  Add Enterprise Edition license (#16801)
  [FIX] Fallback content-type as application/octet-stream for FileSystem uploads (#16776)
  [IMPROVE] Apps-engine E2E tests (#16781)
  [FIX] Remove spaces from i18n placeholders to show Personal access token (#16724)
  [NEW] SAML config to allow clock drift (#16751)
  [FIX] Slash command preview: Wrong item being selected, Horizontal scroll (#16750)
  [FIX] Cannot pin on direct messages (#16759)
  [FIX] Get all channels from Slack via REST API (#16767)
  LingoHub Update 🚀 (#16837)
  [FIX]  Flextab information is not working when clicking on visitor or agent username in Omnichannel messages (#16797)
  Update Node to 12.16.1
  [NEW] Update Meteor to 1.9.2 (#16718)
  ...
ggazzo added a commit to wreiske/Rocket.Chat that referenced this pull request Mar 19, 2020
…4892-wreiske-user-status-bubbles

* 'develop' of github.com:RocketChat/Rocket.Chat: (540 commits)
  [FIX] Show error message if password and confirm password not equal (RocketChat#16247)
  [FIX] Message quote button inside threads (RocketChat#16925)
  Fix wrong imported library meteor/tap:i18n
  lint
  [IMPROVE] User gets feedback when a message has been starred or unstarred (RocketChat#13860)
  [FIX] admin can sort users by email in directory view (RocketChat#15796)
  [FIX] Pinned messages wouldn't collapse (RocketChat#16188)
  [IMPROVE] Added border to page header. (RocketChat#16792)
  [FIX] Correct thread messages display in context bar. (RocketChat#16835)
  [FIX] Public channel cannot be acessed via URL when 'Allow Anonymous Read' is active (RocketChat#16914)
  Fixed Line break incorrectly being called apostrophe (RocketChat#16918)
  [IMPROVE] Context menu autofocus (RocketChat#16915)
  Improve room types usage (RocketChat#16753)
  [NEW] API `users.deactivateIdle` for mass-disabling of idle users (RocketChat#16849)
  [NEW] API to logout from other locations (RocketChat#16193)
  [IMPROVE] Add option to require authentication on user's shield endpoint (RocketChat#16845)
  [FIX] Custom OAuth Bug (RocketChat#16811)
  [FIX] Integrations page pagination (RocketChat#16838)
  reset package-lock to upstream
  Apply suggestions from code review
  ...
ggazzo added a commit that referenced this pull request Mar 20, 2020
…ultiple-users* 'develop' of github.com:RocketChat/Rocket.Chat: (53 commits) [FIX] Show error message if password and confirm password not equal (#16247)  [FIX] Message quote button inside threads (#16925)  Fix wrong imported library meteor/tap:i18n  lint  [IMPROVE] User gets feedback when a message has been starred or unstarred (#13860)  [FIX] admin can sort users by email in directory view (#15796)  [FIX] Pinned messages wouldn't collapse (#16188)  [IMPROVE] Added border to page header. (#16792)  [FIX] Correct thread messages display in context bar. (#16835)  [FIX] Public channel cannot be acessed via URL when 'Allow Anonymous Read' is active (#16914)  Fixed Line break incorrectly being called apostrophe (#16918)  [IMPROVE] Context menu autofocus (#16915)  Improve room types usage (#16753)  [NEW] API `users.deactivateIdle` for mass-disabling of idle users (#16849)  [NEW] API to logout from other locations (#16193)  [IMPROVE] Add option to require authentication on user's shield endpoint (#16845)  [FIX] Custom OAuth Bug (#16811)  [FIX] Integrations page pagination (#16838)  reset package-lock to upstream  Apply suggestions from code review  ...
@sampaiodiego sampaiodiego mentioned this pull request Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants