Skip to content
  • Pam Artiaga's avatar
    Fetch group and project after session has been loaded · f662289f
    Pam Artiaga authored and Thong Kuah's avatar Thong Kuah committed
    The group and project objects are called in a `prepend_before_action`
    so that they are fetched before the authorization checks
    (e.g.: authorize_admin_cluster, authorize_update_cluster).
    
    However, this results in a bug because fetching the group or project
    requires the session to be loaded already, and `prepend_before_action`
    calls happen before the session is loaded.
    
    To resolve the problem, we will instead load the group or project
    object in the very first `before_action` in the ClustersController
    call stack.
    
    Changelog: fixed
    f662289f