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

Users should always be able to edit their user/non-room widgets #1879

Merged
merged 4 commits into from
May 9, 2018

Conversation

rxl881
Copy link
Contributor

@rxl881 rxl881 commented May 8, 2018

"User widgets" such as sticker pickers should always be editable by their owner (regardless of the room that they are currently viewing).

@ara4n
Copy link
Member

ara4n commented May 8, 2018

looks plausible modulo duff tests

@@ -274,6 +274,11 @@ export default class AppTile extends React.Component {
}

_canUserModify() {
// User widgets should always be modifiable by their creator
if (this.props.userWidget && MatrixClientPeg.get().credentials.userId === this.props.creatorUserId) {
Copy link
Member

Choose a reason for hiding this comment

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

I've recently been pointed to get the MatrixClient instance over React Contexts, probably worth pointing out here also

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for pointing this out @t3chguy. Having spoken with @dbkr about this, it appears that passing context to the context-menus is a little complicated. So, for the time being we've chosen to leave this as is (I will bear it in mind in future though). Cheers.

@rxl881 rxl881 merged commit c81e1ec into develop May 9, 2018
@rxl881 rxl881 deleted the rxl881/widgetPermissions branch May 9, 2018 14:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants