Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • Project Forum Project Forum
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 89
    • Issues 89
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • EIP
  • Project Forum
  • Project ForumProject Forum
  • Merge requests
  • !729

Open
Created Jun 13, 2022 by Taico Aerts@taicoaertsOwner2 of 3 tasks completed2/3 tasks
  • Report abuse
Report abuse

Draft: Improve permission checks and logic

  • Overview 2
  • Commits 63
  • Changes 15
  • Fix rolify with_role to be combineable into larger queries without using .ids
  • Add option to define rolify relations easily as has_many relations on models.
  • Update associatable with the increased flexibility to let ActiveRecord combine queries better.
  • Make use of hashes rather than .ids in the ability to prevent queries on load and allow CanCanCan to do its job better
  • Add extension to CanCanCan to allow joining can definitions with scopes together

TODO:

  • Check whether using .select(:id) in the ability makes better queries than the left-over id: ....ids.
  • Check performance of new roles queries (left outer join) and determine whether its better to use scopes.
  • Convert more of the ability file to use scopes.

Relates to #81

Edited Jul 24, 2022 by Taico Aerts
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: optimizations