From 6c6aa539049f65e96f46a989e6b9eab182a79dd4 Mon Sep 17 00:00:00 2001 From: mlorb Date: Tue, 17 Oct 2017 15:52:18 +0200 Subject: [PATCH 1/2] add new team to redux --- .../src/scenes/SettingsPage/scenes/teams/new/index.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/javascript/src/scenes/SettingsPage/scenes/teams/new/index.jsx b/app/javascript/src/scenes/SettingsPage/scenes/teams/new/index.jsx index 2ea1ea55b..6848758a9 100644 --- a/app/javascript/src/scenes/SettingsPage/scenes/teams/new/index.jsx +++ b/app/javascript/src/scenes/SettingsPage/scenes/teams/new/index.jsx @@ -1,4 +1,5 @@ import React, { Component } from "react"; +import { connect } from "react-redux"; import { Breadcrumb, FormGroup, @@ -25,6 +26,7 @@ import { NAME_MAX_LENGTH, TEXT_MAX_LENGTH } from "../../../../../config/constants/numeric"; +import { getTeamsList } from "../../../../../components/actions/TeamsActions"; import { BORDER_LIGHT_COLOR } from "../../../../../config/constants/colors"; @@ -39,7 +41,9 @@ const Wrapper = styled.div` padding: 16px 15px 50px 15px; `; -const MyFormGroupDiv = styled.div`margin-bottom: 15px;`; +const MyFormGroupDiv = styled.div` + margin-bottom: 15px; +`; class SettingsNewTeam extends Component { constructor(props) { @@ -76,6 +80,7 @@ class SettingsNewTeam extends Component { }) .then(sr => { // Redirect to the new team page + this.props.getTeamsList(); this.newState = { ...this.state }; this.newState = update(this.newState, { redirectTo: { @@ -266,4 +271,4 @@ class SettingsNewTeam extends Component { } } -export default SettingsNewTeam; +export default connect(null, { getTeamsList })(SettingsNewTeam); From c554bc5c18b8792f95111d11da94444686c81054 Mon Sep 17 00:00:00 2001 From: zmagod Date: Tue, 17 Oct 2017 16:00:26 +0200 Subject: [PATCH 2/2] fixes accept invitation bug [fixes SCI-1684] --- app/controllers/users/invitations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users/invitations_controller.rb b/app/controllers/users/invitations_controller.rb index 2e34622bc..ef22e3d39 100644 --- a/app/controllers/users/invitations_controller.rb +++ b/app/controllers/users/invitations_controller.rb @@ -153,7 +153,7 @@ module Users def update_sanitized_params # Solution for Devise < 4.0.0 - devise_parameter_sanitizer.for(:accept_invitation) << :full_name + devise_parameter_sanitizer.permit(:sign_up, keys: [:full_name]) end def check_captcha