Comments (16)
@jayesh92 Thanks for opening an issue. Nice sharing of knowledge and teamwork.
Some quick tips for all on issue communications:
- Think about the reader's perspective. Can I, as the reader, quickly and easily understand the issue? Where to look for details? Remember many developers are actively working on multiple projects. This requires a developer to do a mental context switch each time they switch projects. Remember that you know the details of the issue but the project maintainer may need a bit of higher level background.
- Try to use the GitHub markdown to make the issue more user friendly (good job to @jayesh92 and @vubo on this)
- Break up into different paragraphs:
- high level issue,
- steps (if known to replicate issue),
- possible cause (if known),
- possible next actions for collaboration on issue
I'm going to reformat the original issue to see if I have understanding of the issue.
from vms.
The functional test "check if admin can access a volunteer view" is failing. The test can be viewed at jayesh92@45a3993#diff-0df96ededa86aa47a9dbdb5655a6908aR177 .
I've created an admin account and tried to browse url /shift/view_volunteer_shifts/1 which is meant to be a volunteer view. I get a 500 error instead of 403.
The code for view being tested is https://github.com/systers/vms/blob/develop/vms/shift/views.py#L285 .
Suggestions: The problem here is at line 290, since it's an admin account it's volunteer field will be None and we can't access its 'id'. It would be better if we first check if its not a volunteer and then raise a 403 or better we create a decorator to check admin and use this for all volunteer views.
[My reformatting of @jayesh92's original issue with two minor edits]
from vms.
Questions on the vms project functionality:
- What is the purpose of view_volunteer_shifts?
- How does an admin view volunteer shifts of another volunteer?
- What happens if an admin is also a volunteer?
My recommendation, before addressing the testing issue, would be to address these questions and create a docstring for the function (view_volunteer_shifts) to clarify expected behavior of the function.
After that, I recommend @vubo and @jayesh92 work together to determine if the desired behaviors are being covered properly by functional tests and create a plan to do so.
Thanks!
from vms.
- view_volunteer_shifts shows the shifts which the volunteer has either registered for or have been assigned by an admin. He can cancel or log hours from this view.
- Admin can generate report to see logged in hours of a shift.
- Not sure on this
@Nerdylicious can tell more about the desired functionality about this issue.
from vms.
Hi everyone,
- Jayesh is on the right track with how to fix this issue (as he described above). I didn't have time to fix this part before GSOC. There may be other views with a similar issue as this that must be fixed.
- The admin can view the shifts of a volunteer when they manage the shifts of the volunteer (this functionality is in
manage_volunteer_shifts
in/shift/views.py
- For now, only administrators are only allowed to manage (create/update/delete) events, jobs, shifts and pull reports. You might want to ask Rose if she wants admins to also be volunteers.
from vms.
Thank you @jayesh92 for opening an issue. I will get around to it. This part is also in my timeline (22 June-19 July).
@rosariorobinson could you tell please, can admins also be volunteers? And if yes, what should happen if an admin is also a volunteer?
from vms.
@jayesh92 I'm reviewing open issues. I noticed that your travis.yml file is using Python 2.7. We are currently using Python 3.4 for development. You may wish to add that to your travis file.
from vms.
@willingc I'll add that
from vms.
Thanks @jayesh92. It may help catch some issues sooner versus later. Also Travis can test both Python versions if desired.
from vms.
@willingc We can configure travis to run for PY2 and PY3. I guess it would be good to do so once we have a good compatibility file to take care of differences in coding practices of PY2 and PY3
from vms.
@vubo ... Yes, admins can be volunteers. Because they are admins, they should still be able to visit a volunteer job/position and sign up as they were just a volunteer. I think I see admins as just a different view than others with additional functionality. They should be able to view VMS as a volunteer as well.
Let me know if you need more clarity.
from vms.
@jayesh92 @vubo Can this issue be closed out or are the tests still failing?
from vms.
@willingc yes, I fixed it: #99
from vms.
Thanks @vubo. I am closing this issue based on latest merged PR #99.
@jayesh92 Feel free to reopen if needed.
from vms.
fine by my side
from vms.
Thanks @jayesh92 :)
from vms.
Related Issues (20)
- Upgrade Django to 3.0.9(latest) HOT 20
- Fix binary string in the URL on the email verification HOT 6
- Add badges to the Readme File for codecov HOT 9
- Fix the unable to locate element error HOT 19
- [Feature] Add Hide/show toggle feature for all password fields HOT 30
- Country, State & City field must be a dropdown in Volunteer Signup HOT 7
- Resize-able Text area in Sign-Up Volunteer HOT 7
- Fix some failing test cases HOT 14
- Bug: Set Top margin of main container HOT 4
- Step by step guide for absolute beginners to contribute HOT 10
- fix label error in sign up
- Setup and run HOT 2
- Bug: Error when registering as admin HOT 7
- Readme for Open Source Hack HOT 2
- Bug: Email Confirmation link is not correct HOT 2
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- Add toggling effect on buttons HOT 5
- Deploy to Heroku and write instructions on how to do that HOT 12
- blog: OSH Experience HOT 6
- Admin account activation URL is not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vms.