ghosts-network / gateway

RESTful public API for GhostNetwork education project
1 stars 5 forks source link

Only owner can remove publication #22

Closed volodymyr-borodin closed 3 years ago

volodymyr-borodin commented 3 years ago

Describe the bug Not only author of publication can remove it.

To Reproduce Steps to reproduce the behavior:

  1. Create publication as User1
  2. Delete it as User2

Expected behavior Delete trying should return 403 status code

Sekir0 commented 3 years ago

must be smt like this? i think it's can be simplified https://github.com/ghosts-network/gateway/blob/00e9e2ce3681d96156b7ef8567da820c2304ca86/Infrastructure/GhostNetwork.Infrastructure.Repository/NewsFeedStorage.cs#L145

volodymyr-borodin commented 3 years ago

For now a don’t like how NewsFeedStorage looks like at all, but your solution is good enough