Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

yotta / pictogram

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 60
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Closed
Open
Issue #224 opened May 18, 2017 by Jose Antonio@jlrufian 
  • New issue
New issue

Prueba 1.1.3, 1.3.4 y 1.3.7 Relacionado con Issue #239

  1. Asignamos a un supervisor de otro centro a un estudiante
  2. El estudiante tiene sesión iniciada en PCB
  3. Entramos como ese supervisor
  4. Seleccionamos la sección de colecciones o cualquier otra del estudiante
  5. Aparece error Sin conexión a la cuenta del estudiante
  6. La interfaz presenta errores, además sólo se ven las pestañas colecciones, informes y configuración

supervisor lopezru.joseantonio@gmail.com

En tutores comportamiento similar: tutor asdad@honor-8.com

Pese a asignarse a CAJA cuando se registra, aparece en Mi centro Recibe error no_suscribed cuando accede a los datos del estudiante

  • Jose Antonio @jlrufian

    changed title from Errores al acceder con supervisor a datos de un estudiante de otro centro to Prueba 1.1.3, 1.3.4 y 1.3.7

    May 18, 2017

    changed title from Errores al acceder con supervisor a datos de un estudiante de otro centro to Prueba 1.1.3, 1.3.4 y 1.3.7

    changed title from **{-Errores al acceder con supervisor a datos de un estudiante de otro centro-}** to **{+Prueba 1.1.3, 1.3.4 y 1.3.7+}**
    Toggle commit list
  • Arturo Montejo Ráez @amontejo

    added To Do label

    May 22, 2017

    added To Do label

    added ~29 label
    Toggle commit list
  • Jose Antonio @jlrufian

    changed title from Prueba 1.1.3, 1.3.4 y 1.3.7 to Prueba 1.1.3, 1.3.4 y 1.3.7{+ Relacionado con Issue #239 (closed)+}

    May 23, 2017

    changed title from Prueba 1.1.3, 1.3.4 y 1.3.7 to Prueba 1.1.3, 1.3.4 y 1.3.7{+ Relacionado con Issue #239 (closed)+}

    changed title from **Prueba 1.1.3, 1.3.4 y 1.3.7** to **Prueba 1.1.3, 1.3.4 y 1.3.7{+ Relacionado con Issue #239+}**
    Toggle commit list
  • Jose Antonio @jlrufian

    mentioned in issue #239 (closed)

    May 23, 2017

    mentioned in issue #239 (closed)

    mentioned in issue #239
    Toggle commit list
  • Jose Antonio @jlrufian commented May 24, 2017

    En studentController.js método getInfo, se comprueba la relación entre el estudiante y el supervisor que realiza la llamada al método:

    // requester has no relation
          student.supervision = -1;
    
          if (!stu_sup && req.token.office && student.office == req.token.office.id && req.token.isSupAdmin)
            student.supervision = 0; // requester is admin of the office
          else if (stu_sup && !req.token.office)
            student.supervision = 1; // requester is tutor of the studend
          else if (stu_sup && req.token.office && student.office == req.token.office.id)
            student.supervision = 2; // requester is supervisor of student
            else if (req.token.isStudent && req.token.id == student.id)
             student.supervision = 3 // requester is the student himself
    
          if (student.supervision == -1) // should not hace access!!!
            return res.forbidden("Access to this student should not be granted to you");

    En el segundo else if, la condición de que tanto estudiante como supervisor pertenezcan a la misma office no se cumple.

    Edited May 24, 2017 by Jose Antonio
    En studentController.js método getInfo, se comprueba la relación entre el estudiante y el supervisor que realiza la llamada al método: ``` // requester has no relation student.supervision = -1; if (!stu_sup && req.token.office && student.office == req.token.office.id && req.token.isSupAdmin) student.supervision = 0; // requester is admin of the office else if (stu_sup && !req.token.office) student.supervision = 1; // requester is tutor of the studend else if (stu_sup && req.token.office && student.office == req.token.office.id) student.supervision = 2; // requester is supervisor of student else if (req.token.isStudent && req.token.id == student.id) student.supervision = 3 // requester is the student himself if (student.supervision == -1) // should not hace access!!! return res.forbidden("Access to this student should not be granted to you"); ``` En el segundo else if, la condición de que tanto estudiante como supervisor pertenezcan a la misma office no se cumple.
  • Arturo Montejo Ráez @amontejo commented May 25, 2017
    Owner

    Cierto. Lo más sencillo es no limitar que un estudiante y un supervisor deban estar en la misma oficina.

    Cierto. Lo más sencillo es no limitar que un estudiante y un supervisor deban estar en la misma oficina.
  • Arturo Montejo Ráez @amontejo

    closed

    May 25, 2017

    closed

    closed
    Toggle commit list
  • Arturo Montejo Ráez @amontejo

    mentioned in commit 297f8a63

    May 25, 2017

    mentioned in commit 297f8a63

    mentioned in commit 297f8a63545a921c47b80b7b0f1f86078803a5f3
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
No due date
2
Labels
To Do bug
Assign labels
  • View labels
2
2 participants
Reference: yotta/pictogram#224