Skip to content

[$50] Prod - can't delete discussion #458

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

Closed
jmgasper opened this issue Mar 5, 2021 · 13 comments
Closed

[$50] Prod - can't delete discussion #458

jmgasper opened this issue Mar 5, 2021 · 13 comments

Comments

@jmgasper
Copy link
Collaborator

jmgasper commented Mar 5, 2021

@atelomycterus - We're running into a problem on prod.

There was a spam post added that we want to delete, but no one seems to be able to. All permissions look fine for the admins, but it still gives us a 403, which is strange. We've tried clearing cache, logging out / in, and nothing seems to help.

Screen Shot 2021-03-05 at 2 44 10 pm

@jmgasper
Copy link
Collaborator Author

jmgasper commented Mar 5, 2021

Challenge https://www.topcoder.com/challenges/5adcc53a-e371-4508-809c-335189a1584e has been created for this ticket.

This is an automated message for ghostar via Topcoder X

@jmgasper
Copy link
Collaborator Author

jmgasper commented Mar 5, 2021

Challenge https://www.topcoder.com/challenges/5adcc53a-e371-4508-809c-335189a1584e has been assigned to obog.

This is an automated message for ghostar via Topcoder X

@atelomycterus
Copy link
Collaborator

@jmgasper I've tested it in DEV and got the same error but I can delete discussions using REST API ('/discussions/{id}'):
image

After deleting if you go to the discussion then the message should be displayed:
image

I've looked at the code. The both controllers (DiscussionsController and DiscussionsAPIController) verify the current user's permission ('Vanilla.Discussions.Delete') in a category. They call the same method, but there are differences in the call parameters. I'll debug it today locally.

@atelomycterus
Copy link
Collaborator

@jmgasper DiscussionID is shown in URL ☝️
image

@atelomycterus
Copy link
Collaborator

@jmgasper The issue was caused by 'target' query param. Please apply PR-#460 and I'll test it. Thanks.

@atelomycterus
Copy link
Collaborator

Before deploying PR in DEV:
Author or any users with 'Vanilla,Discussions.Delete' can't delete discussions
image

@jmgasper
Copy link
Collaborator Author

jmgasper commented Mar 6, 2021

@atelomycterus - Done, deploying now, thanks.

@atelomycterus
Copy link
Collaborator

atelomycterus commented Mar 6, 2021

@jmgasper Verified in DEV. It works as expected.

image

image

After deleting a discussion:
image

Using a discussion link:
image

Normal user without 'Vanilla.Discussions.Delete' permission, copy&paste a discussion delete link in a browser address bar:
image

@jmgasper
Copy link
Collaborator Author

jmgasper commented Mar 7, 2021

Payment task has been updated: https://www.topcoder.com/challenges/5adcc53a-e371-4508-809c-335189a1584e
Payments Complete
Winner: obog
Copilot: ghostar
Challenge 5adcc53a-e371-4508-809c-335189a1584e has been paid and closed.

This is an automated message for ghostar via Topcoder X

@jmgasper jmgasper reopened this Mar 7, 2021
@jmgasper jmgasper closed this as completed Mar 7, 2021
@sdgun
Copy link
Collaborator

sdgun commented Mar 8, 2021

Verified in Dev from Admin.

@lakshmiathreya
Copy link

Screenshot 2021-03-16 at 11 26 43 AM

Screenshot 2021-03-16 at 11 27 20 AM

@lakshmiathreya
Copy link

@sdgun pls review my Prod screenshots and close ...

@sdgun
Copy link
Collaborator

sdgun commented Mar 16, 2021

Verified the screenshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants