Skip to content
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

Any user can return any borrowed tool #91

Open
destos opened this issue Jan 19, 2019 · 6 comments
Open

Any user can return any borrowed tool #91

destos opened this issue Jan 19, 2019 · 6 comments
Labels
bug Something isn't working

Comments

@destos
Copy link
Contributor

destos commented Jan 19, 2019

Describe the bug
When browsing tools, if another user has borrowed a tool. You're able to return it even, if it isn't your tool or you aren't the one borrowing it.

Expected behavior
When you've borrowed a tool you're able to return it. If a tool of yours is borrowed you're also able to set it as returned.

@destos destos added the bug Something isn't working label Jan 19, 2019
@varunu28
Copy link

@destos I will like to work on this issue. Can you please assign it to me?

@destos destos assigned destos and unassigned destos Feb 15, 2019
@destos
Copy link
Contributor Author

destos commented Feb 15, 2019

@varunu28 It won't let me assign it to you. Possibly due to you not being in the organization. I would just start working on it. First, get toolhub setup locally if you haven't already. At that point, we can discuss the implementation of this feature.

@varunu28
Copy link

@destos Sure thing. I will get started with the setup on my local machine

@varunu28
Copy link

@destos I have finished the setup locally and was also able to replicate the issue on my local machine.

test

Here the hammer was created by user Varun Upadhyay and then user Varun Sjsu was able to return the tool. I have a feeling that there is a user check missing in the tool return function. We can discuss it in detail and then I can go ahead with implementing the fix for this.

@destos
Copy link
Contributor Author

destos commented Feb 18, 2019

@varunu28 Glad you got it all setup!
The template tags around borrowing are in the borrowing app:
https://github.com/bkmakerspace/toolhub/tree/master/borrowing

It was implemented as two views, a borrow, and a return. They take post data from the templatetag form code and perform the return/borrow action. The validation logic probably needs to go in that form. https://github.com/bkmakerspace/toolhub/blob/master/borrowing/forms.py

@varunu28
Copy link

@destos Thanks a ton. Will get started on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants