Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-24086:Disable changing picture if LDAP sync'ed #5465

Merged
merged 7 commits into from
May 20, 2020

Conversation

sbishel
Copy link
Member

@sbishel sbishel commented May 8, 2020

Summary

When LDAP sync is turned on and a Picture attribute is selected, the user will not be able to change the profile picture. Instead they will be displayed a message that the picture is controlled by LDAP settings. This is the same way other LDAP Attributes work.

Ticket Link

https://mattermost.atlassian.net/browse/MM-24086

Screenshots

Screen Shot 2020-05-08 at 3 51 08 PM

@sbishel sbishel added 2: Dev Review Requires review by a core commiter 3: QA Review Requires review by a QA tester labels May 8, 2020
disabled={disableSaveButtonFocus}
ref={this.confirmButton}
className={confirmButtonClass}
onClick={this.props.loadingPicture ? () => true : this.handleSave}
Copy link
Contributor

Choose a reason for hiding this comment

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

The () => true function will create a new function every time causing unnecessary re-renders downstream vs creating a this.returnTrue method on the SettingPicture component.

@sbishel sbishel changed the title Disable changing picture if LDAP sync'ed MM-24086:Disable changing picture if LDAP sync'ed May 12, 2020
@amyblais amyblais added this to the v5.24.0 milestone May 13, 2020
@sbishel
Copy link
Member Author

sbishel commented May 14, 2020

/update-branch

Copy link
Contributor

@hahmadia hahmadia left a comment

Choose a reason for hiding this comment

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

Looks good. Just one minor comment. Thanks 😄

components/setting_picture.jsx Outdated Show resolved Hide resolved
@sbishel sbishel requested a review from hahmadia May 19, 2020 16:57
Copy link
Contributor

@hahmadia hahmadia left a comment

Choose a reason for hiding this comment

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

Much better. LGTM! Thanks!

@sbishel sbishel requested a review from srkgupta May 19, 2020 17:27
@sbishel sbishel removed the 2: Dev Review Requires review by a core commiter label May 19, 2020
@sbishel
Copy link
Member Author

sbishel commented May 19, 2020

/update-branch

@sbishel sbishel removed the request for review from catalintomai May 19, 2020 20:58
Copy link
Contributor

@srkgupta srkgupta left a comment

Choose a reason for hiding this comment

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

Tested the PR and the changes looks good. Approving the PR.

@srkgupta srkgupta added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester labels May 20, 2020
@srkgupta srkgupta merged commit a021e31 into mattermost:master May 20, 2020
@amyblais amyblais added the CherryPick/Approved Meant for the quality or patch release tracked in the milestone label May 20, 2020
@sbishel
Copy link
Member Author

sbishel commented May 20, 2020

/cherry-pick release-5.24

@mattermod mattermod added CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone and removed CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels May 20, 2020
sbishel added a commit that referenced this pull request May 20, 2020
* Disable changing picture if LDAP sync'ed

* add imageContext property back, still used.

* updates from code review

* update for review

* fix lint error

Co-authored-by: Scott Bishel <[email protected]>
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels May 20, 2020
@sbishel sbishel deleted the MM-24086-settings-ldap-profile branch June 1, 2020 17:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry CherryPick/Done Successfully cherry-picked to the quality or patch release tracked in the milestone Docs/Not Needed Does not require documentation
Projects
None yet
6 participants