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

A teacher can add a material to other teacher's course #66

Open
Tatyana-Kravchenko opened this issue Jul 1, 2022 · 1 comment
Open
Labels
bug Something isn't working question Further information is requested

Comments

@Tatyana-Kravchenko
Copy link

Tatyana-Kravchenko commented Jul 1, 2022

Steps to reproduce
Teacher created course (id: {{courseIdForMaterials}})
Post {{host}}/api/v1/courses

{
  "title": "How to create test cases1 {{coursePostfix}}",
  "description": "Basic course about test design technique",
  "visible": true,
  "categoryId": {{categoryIdForMaterial}}
}

Teacher 2 tries to add a material in teacher's course
POST {{host}}/api/v1/courses/{{courseIdForMaterials}}/materials
Request Body

{
  "title": "Additional material {{materialPostfix}}",
  "data": "stringstri",
  "order": 0
}

Actual behavior

  1. Status code is 200
  2. Response time is less than 1000 ms
  3. Teacher 2 added a new material in the teacher's course

Expected behavior

  1. Status code is 403
  2. Response time is less than 1000 ms
  3. Teacher 2 can't add a new material in the teacher's course
  4. The error text message ("You're not owner of this course, you can't change/remove it") is correct
    Screenshots
    If applicable, add screenshots to help explain your problem.
    image
    image
    image
@Tatyana-Kravchenko Tatyana-Kravchenko changed the title Teacher 2 can't add new material in teacher's course Teacher 2 tries to add new material in teacher's course - Unexpected Status code Jul 1, 2022
@Tatyana-Kravchenko Tatyana-Kravchenko changed the title Teacher 2 tries to add new material in teacher's course - Unexpected Status code Teacher 2 tries to add new material in teacher's course - Unexpected Behaviour Jul 1, 2022
@viraxslot viraxslot changed the title Teacher 2 tries to add new material in teacher's course - Unexpected Behaviour A teacher can add a material to other teacher's course Jul 15, 2022
@viraxslot
Copy link
Owner

@Tatyana-Kravchenko I think about collaboration. What do you think if we convert this bug to a feature? Maybe a teacher can invite the other teacher to work together on a course.

@viraxslot viraxslot added question Further information is requested bug Something isn't working labels Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants