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

Added ability to change user password #1954

Merged
merged 7 commits into from
Aug 7, 2020
Merged

Added ability to change user password #1954

merged 7 commits into from
Aug 7, 2020

Conversation

azhavoro
Copy link
Contributor

@azhavoro azhavoro commented Jul 28, 2020

Added ability to change user password

How has this been tested?

Manual testing

Checklist

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below)
# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

@coveralls
Copy link

coveralls commented Jul 28, 2020

Pull Request Test Coverage Report for Build 6793

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 185 unchanged lines in 8 files lost coverage.
  • Overall coverage increased (+0.02%) to 69.085%

Files with Coverage Reduction New Missed Lines %
cvat/apps/engine/media_extractors.py 5 76.11%
cvat/apps/engine/urls.py 5 76.67%
cvat/apps/authentication/views.py 8 64.29%
src/api-implementation.js 8 77.55%
datumaro/datumaro/plugins/coco_format/converter.py 19 89.76%
src/api.js 24 55.13%
datumaro/datumaro/components/extractor.py 33 90.92%
cvat/apps/engine/views.py 83 78.64%
Totals Coverage Status
Change from base Build 6737: 0.02%
Covered Lines: 11143
Relevant Lines: 15625

💛 - Coveralls

cvat-ui/src/actions/auth-actions.ts Outdated Show resolved Hide resolved
cvat/settings/base.py Show resolved Hide resolved
@@ -13,6 +13,10 @@ export interface AuthState {
initialized: boolean;
fetching: boolean;
user: any;
authActionsFetching: boolean;
authActionsInitialized: boolean,
Copy link
Member

Choose a reason for hiding this comment

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

;

Comment on lines 1 to 40
// Copyright (C) 2020 Intel Corporation
//
// SPDX-License-Identifier: MIT

import { connect } from 'react-redux';
import ChangePasswordModalComponent from 'components/change-password-modal/change-password-modal';
import { CombinedState } from 'reducers/interfaces';
import { changePasswordAsync } from 'actions/auth-actions';

interface StateToProps {
fetching: boolean;
visible: boolean;
}

interface DispatchToProps {
onChangePassword(
oldPassword: string,
newPassword1: string,
newPassword2: string): void;
}

function mapStateToProps(state: CombinedState): StateToProps {
return {
fetching: state.auth.fetching,
visible: state.auth.showChangePasswordDialog,
};
}

function mapDispatchToProps(dispatch: any): DispatchToProps {
return ({
onChangePassword(oldPassword: string, newPassword1: string, newPassword2: string): void {
dispatch(changePasswordAsync(oldPassword, newPassword1, newPassword2));
},
});
}

export default connect(
mapStateToProps,
mapDispatchToProps,
)(ChangePasswordModalComponent);
Copy link
Member

@bsekachev bsekachev Jul 29, 2020

Choose a reason for hiding this comment

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

I believe we can move it to components/change-password-modal/change-password-modal and remove this file. No need to have separated container file to getting state from redux storage.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it

);
}

export default withRouter(ChangePasswordComponent);
Copy link
Member

Choose a reason for hiding this comment

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

I don't see how you use RouterProps here

@bsekachev
Copy link
Member

@ActiveChooN

Could you please also take a look at this PR?

@bsekachev
Copy link
Member

@azhavoro Please, update minor versions for cvat-ui and cvat-core

} & FormComponentProps;

class ChangePasswordFormComponent extends React.PureComponent<ChangePasswordFormProps> {
private validateConfirmation = (rule: any, value: any, callback: any): void => {
Copy link
Contributor

Choose a reason for hiding this comment

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

@azhavoro, parameters type can be more strict than any

@ActiveChooN
Copy link
Contributor

@azhavoro, can you also fix linting problems related to your PR, please?

@nmanovic
Copy link
Contributor

nmanovic commented Aug 5, 2020

@zhiltsov-max , could you please look at the PR and test it?

@ActiveChooN ActiveChooN self-requested a review August 6, 2020 07:42
@nmanovic nmanovic merged commit 4cb75a6 into develop Aug 7, 2020
@nmanovic nmanovic deleted the az/change_pass branch August 7, 2020 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants