Skip to content

Gradebook: Security: Allow session coaches and session admins to view… - #9370

Open
contidos wants to merge 1 commit into
chamilo:1.11.xfrom
contidos:upstream-pr/certificates-session-staff
Open

contidos wants to merge 1 commit into
chamilo:1.11.xfrom
contidos:upstream-pr/certificates-session-staff

Conversation

@contidos

@contidos contidos commented Oct 30, 2026 •

Copy link
Copy Markdown

… the certificates of their own session

The access control added for BT#23524 only grants access to the owner, a platform admin or a teacher of the certificate's course (CourseManager::is_course_teacher). In a session the tutors are session coaches (status 2 in session_rel_course_rel_user) and the general coach, not teachers of the base course, and session admins are not course teachers either, so they get "not allowed" when opening a certificate from the session gradebook, even though they can list it.

Grant access to those roles, restricted to the session the certificate belongs to:

  • course coach of that course in that session (api_is_course_session_coach)
  • general coach of that session (SessionManager::user_is_general_coach)
  • session admin, if the platform lets session admins manage all sessions or if they are the admin of that session (session_admin_id)

Students, coaches of other sessions and anonymous visitors keep the same behaviour.

… the certificates of their own session

The access control added for BT#23524 only grants access to the owner, a platform
admin or a teacher of the certificate's course (CourseManager::is_course_teacher).
In a session the tutors are session coaches (status 2 in session_rel_course_rel_user)
and the general coach, not teachers of the base course, and session admins are not
course teachers either, so they get "not allowed" when opening a certificate from
the session gradebook, even though they can list it.

Grant access to those roles, restricted to the session the certificate belongs to:
- course coach of that course in that session (api_is_course_session_coach)
- general coach of that session (SessionManager::user_is_general_coach)
- session admin, if the platform lets session admins manage all sessions or if they
  are the admin of that session (session_admin_id)

Students, coaches of other sessions and anonymous visitors keep the same behaviour.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants