-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
Regression: Permissions missing on new Room Edit and Contact Edit form #21315
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@renatobecker Sorry I wasn't able to reproduce this error. Could you please check again ? |
@murtaza98 the implementation fixes the issues, however, it's clear that both Since those components are used in different areas of the product, they should be placed in a "global" folder, not inside the "directory" folder. @rafaelblink please, help us reviewing this PR. Thanks. |
@renatobecker I've moved out the files. Could you please review it again? Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are we checking permissions for room editing and contact editing? I didn't find it.
This is how we used to check it on the old version:
Also, we can't just add a permission check for rendering the button or not because the user can access the route through the URL, so the permission needs to allow/deny accessing the edit form(room or contact) anyways.
@renatobecker For Room i've implemented the same logic as here. However I'm not sure what permission to use for Contact edit? Should I create a new global permission |
…om/RocketChat/Rocket.Chat into omnichannel/March2021-regression-2
Yes. |
Hey @renatobecker, This part is complete |
…om/RocketChat/Rocket.Chat into omnichannel/March2021-regression-2
…om/RocketChat/Rocket.Chat into omnichannel/March2021-regression-2
@@ -890,7 +890,7 @@ Meteor.startup(() => { | |||
|
|||
let room = Rooms.findOne({ _id: rid }, { fields: { t: 1 } }); | |||
|
|||
if (room?.t === 'l' && !FlowRouter.getParam('tab')) { | |||
if (room?.t === 'l') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@renatobecker I forgot to revert this change in the previous commit. So I'm doing it here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we don't have a Chat History
button in contacts directory, this is no longer needed
…om/RocketChat/Rocket.Chat into omnichannel/March2021-regression-2
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments