mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-17 10:15:57 +08:00
fix merge develop branch
This commit is contained in:
9
app/models/gitea/public_key.rb
Normal file
9
app/models/gitea/public_key.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class Gitea::PublicKey < Gitea::Base
|
||||
self.inheritance_column = nil # FIX The single-table inheritance mechanism failed
|
||||
# establish_connection :gitea_db
|
||||
|
||||
self.table_name = "public_key"
|
||||
|
||||
belongs_to :user, class_name: '::User', foreign_key: :gitea_uid, primary_key: :owner_id, optional: true
|
||||
|
||||
end
|
||||
@@ -170,6 +170,7 @@ class User < Owner
|
||||
accepts_nested_attributes_for :is_pinned_projects
|
||||
has_many :issues, dependent: :destroy, foreign_key: :author_id
|
||||
has_many :pull_requests, dependent: :destroy
|
||||
has_many :public_keys, class_name: "Gitea::PublicKey",primary_key: :gitea_uid, foreign_key: :owner_id, dependent: :destroy
|
||||
|
||||
# Groups and active users
|
||||
scope :active, lambda { where(status: [STATUS_ACTIVE, STATUS_EDIT_INFO]) }
|
||||
|
||||
Reference in New Issue
Block a user