fd05e26618
Closes #23150
8 lines
303 B
Ruby
8 lines
303 B
Ruby
class ProjectAuthorization < ActiveRecord::Base
|
|
belongs_to :user
|
|
belongs_to :project
|
|
|
|
validates :project, presence: true
|
|
validates :access_level, inclusion: { in: Gitlab::Access.all_values }, presence: true
|
|
validates :user, uniqueness: { scope: [:project, :access_level] }, presence: true
|
|
end
|