Skip to content

Commit

Permalink
Disable InverseOf cop for User#oauth_grants
Browse files Browse the repository at this point in the history
There is no inverse association defined and we do not "own"
`Doorkeeper::AccessGrant`.
  • Loading branch information
myabc committed Feb 25, 2025
1 parent 4eeb6b4 commit 67189ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class User < Principal
belongs_to :ldap_auth_source, optional: true

# Authorized OAuth grants
has_many :oauth_grants,
has_many :oauth_grants, # rubocop:disable Rails/InverseOf
class_name: "Doorkeeper::AccessGrant",
foreign_key: "resource_owner_id",
dependent: :delete_all
Expand Down

0 comments on commit 67189ea

Please sign in to comment.