diff options
author | Rémy Coutable <remy@rymai.me> | 2016-06-23 17:14:31 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-08-10 19:07:05 +0200 |
commit | 29850364eccccc3ce7305f6706cea1d5d073de2e (patch) | |
tree | bbf98c0a621676b7b3f3e58b4618905923ed1454 /app/models/members/project_member.rb | |
parent | b1aac0382c406b3856db90e15df8b2a9ea7ff6cd (diff) | |
download | gitlab-ce-29850364eccccc3ce7305f6706cea1d5d073de2e.tar.gz |
New AccessRequests API endpoints for Group & Project
Also, mutualize AccessRequests and Members endpoints for Group &
Project.
New API documentation for the AccessRequests endpoints.
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/models/members/project_member.rb')
-rw-r--r-- | app/models/members/project_member.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/members/project_member.rb b/app/models/members/project_member.rb index f176feddbad..18e97c969d7 100644 --- a/app/models/members/project_member.rb +++ b/app/models/members/project_member.rb @@ -8,6 +8,7 @@ class ProjectMember < Member # Make sure project member points only to project as it source default_value_for :source_type, SOURCE_TYPE validates_format_of :source_type, with: /\AProject\z/ + validates :access_level, inclusion: { in: Gitlab::Access.values } default_scope { where(source_type: SOURCE_TYPE) } scope :in_project, ->(project) { where(source_id: project.id) } |