-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$500] HIGH: Review who can remove whom from groups, workspaces, and workspace objects #33575
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01fb7403bad51be652 |
Triggered auto assignment to @MonilBhavsar ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif ( |
I would like to work on this issue, is a proposal required? |
Great question, this is a kind of different issue than normally. So yes, we need some way to choose who to do this, and "first come first serve" doesn't seem very discerning. Can you make a proposal that explains why we should pick you over someone else? I'm not sure what that would entail -- maybe cite past experience, or show that you've already worked in this area of the code, or even pick one of the more complex ones to talk about how you would go about testing it? Something to stand out. |
ProposalPlease re-state the problem that we are trying to solve in this issue.The issue involves recently updated rules about room membership removal in our application, requiring reviewing and clear documentation to ensure consistency. What is the root cause of that problem?N/A What changes do you think we should make in order to solve the problem?Currently, the app does not provide features that attempt the forbidden actions. we should normalize this so developers would not attempt to include this features in the future. and we should ensure that the server reject these actions if someone attempts to do it by an API request. There is two API endpoints for membership removals: "RemoveFromRoom" and "DeleteMembersFromWorkspace" Here is the function that calls the App/src/libs/actions/Report.ts Lines 2189 to 2190 in 8cb48e4
and here is the function that calls App/src/libs/actions/Policy.js Lines 323 to 329 in 8cb48e4
Summary of what should I do in this issue:
Screen RecordingRecording.mp4The server correctly reject the request.
Qualifications
Reply to questions
Currently, the app does not provide features that attempt the forbidden actions. we should normalize this so developers would not attempt to include this features in the future. and we should ensure that the server reject these actions if someone attempts to do it by an API request.
If bugs are discovered during testing, I will report them so the internal team can fix it from backend.
I think that we should only do manual testing in this issue. Internal team will need to add automated tests for this rules to the backend code in the future. What alternative solutions did you explore? (Optional) |
This comment was marked as resolved.
This comment was marked as resolved.
@MonilBhavsar what are the next steps? Do you select a proposal? Or should this have been assigned a C+? |
As per the process, I would like @aimane-chnaif to select a proposal and then I can finally assign them to the issue, if that sounds good |
I have updated the github issue description on posting proposals for this issue. cc @quinthar @aimane-chnaif |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Also tested backend for those rules, no forbidden actions! |
This issue is great. Leaving from the workspace will automatically make you leave from the workspace chat. |
This is not correct. Anybody can be invited to any chat, the sole exception being DM chats, which only ever have 2 participants. But literally anybody can be added to literally any other chat. So I should be able to mention you into my workspace chat, and it should work fine. |
There's no such thing as a "room admin". I think it's fine to remove the creator, as the creator gets no special treatment -- nothing breaks if they are removed, so far as I know. |
I don't quite understand this question. Can you elaborate on it? |
Okay, then I will create a new ticket for that. Because it doesn’t work now, I tried several times in workspace chat to mention different users(workspace members and not) and its not inviting this user |
As you said we should be able to invite new members to the workspace chats by „mentioning them”. |
Yes please do, thanks! |
Correct. |
Still on track for tomorrow or Wed? |
@quinthar if everything is fine with PR - yes, we can finish tomorrow. Will create an issue now and waiting for the reviews. Also I will be OOO tomorrow and on Thursday(2 days) because of the sick leave and if something urgent will appear @rezkiy37 can help with finishing it before I come back! |
New issues created from this ticket:
|
Sounds good, thanks! |
What remains to finish this? I saw "I opened a PR day before yesterday, but no reviews for now" who is this waiting on? What do they need to do, and when will it be done? |
Ah #34987 is waiting for my review. I thought we're still in discussion as |
@aimane-chnaif yes PR is ready for review! Also, Reviewing label was removed because that is not the only PR required for this issue or that PR does not completely fixes/closes this issue 😄 |
PR to update Security settings in README is merged |
Problem:
There are complex rules for which room members can see other room members -- rules that were recently updated because there wasn't widespread agreement on how it should work, and how it did work wasn't really to anyone's liking. There's a risk we're doing the same with who can remove people from the room.
Solution:
As discussed in Slack, these are what the rules should be, as documented in this SO:
Nobody can leave or be removed from something they were automatically added to. For example:
report.accountID
)report.managerID
)Group owners cannot be removed from their groups -- they need to transfer ownership firstExcepting the above, admins can remove anyone. For example:
Group admins can remove other group admins, as well as group membersExcepting the above, members can remove guests. For example:
Excepting the above, anybody can remove themselves from any object
As part of this GH please do the following:
Document the above rules in https://github.com/Expensify/App/blob/main/README.md in a new section called Security, put between Philosophy and Internationalization (add to the ToC and copy the header styles of the surrounding sections)
Find every place in the app that involves adding/removing people to an object's membership, and add a link to that new security section in a comment (eg,
// Please see https://github.com/Expensify/App/blob/main/README.md#Security for more details
)Verify that each of the above rules is being correctly enforced by:
When all the boxes are checked, submit the PR or the new Security section and all the corresponding comment links.
Proposals work differently on this issue
As mentioned by David here #33575 (comment)
We'll choose the proposal that nearly fixes this issue and help us to find and figure out missing pieces
Thanks!
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: