diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 12:09:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 12:09:42 +0000 |
commit | 403678e00406edc8094f087ec70e00aa29e49bef (patch) | |
tree | 447d6d4967e9a11895683b27e637a50bd9fc0602 /lib | |
parent | f5050253469fc0961c02deec0e698ad62bdd9de5 (diff) | |
download | gitlab-ce-403678e00406edc8094f087ec70e00aa29e49bef.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/api.rb | 1 | ||||
-rw-r--r-- | lib/api/helpers/projects_helpers.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/auth.rb | 3 | ||||
-rw-r--r-- | lib/gitlab/import_export/project/import_export.yml | 1 |
4 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb index cf6e7f18a5f..eb7f47de9e2 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -28,6 +28,7 @@ module API ] allow_access_with_scope :api + allow_access_with_scope :read_api, if: -> (request) { request.get? } prefix :api version 'v3', using: :path do diff --git a/lib/api/helpers/projects_helpers.rb b/lib/api/helpers/projects_helpers.rb index cedf50aaff6..8ad682fc961 100644 --- a/lib/api/helpers/projects_helpers.rb +++ b/lib/api/helpers/projects_helpers.rb @@ -129,6 +129,7 @@ module API :avatar, :suggestion_commit_message, :repository_storage, + :compliance_framework_setting, # TODO: remove in API v5, replaced by *_access_level :issues_enabled, diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb index 8a68808d9fd..c489c835d9d 100644 --- a/lib/gitlab/auth.rb +++ b/lib/gitlab/auth.rb @@ -6,7 +6,7 @@ module Gitlab IpBlacklisted = Class.new(StandardError) # Scopes used for GitLab API access - API_SCOPES = [:api, :read_user].freeze + API_SCOPES = [:api, :read_user, :read_api].freeze # Scopes used for GitLab Repository access REPOSITORY_SCOPES = [:read_repository, :write_repository].freeze @@ -198,6 +198,7 @@ module Gitlab def abilities_for_scopes(scopes) abilities_by_scope = { api: full_authentication_abilities, + read_api: read_only_authentication_abilities, read_registry: [:read_container_image], read_repository: [:download_code], write_repository: [:download_code, :push_code] diff --git a/lib/gitlab/import_export/project/import_export.yml b/lib/gitlab/import_export/project/import_export.yml index 06d7dd6f897..3cbd0d144e6 100644 --- a/lib/gitlab/import_export/project/import_export.yml +++ b/lib/gitlab/import_export/project/import_export.yml @@ -159,6 +159,7 @@ excluded_attributes: - :max_artifacts_size - :marked_for_deletion_at - :marked_for_deletion_by_user_id + - :compliance_framework_setting namespaces: - :runners_token - :runners_token_encrypted |