Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Commit

Permalink
Merge branch 'variable-fix' into 'master'
Browse files Browse the repository at this point in the history
Require the variable key to be set and unique

See merge request !234
  • Loading branch information
Robert Speicher committed Aug 19, 2015
2 parents 34283ad + 85f1cd2 commit 1fdd1fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -13,6 +13,7 @@ v7.14.0 (unreleased)
- Fix broken yaml error saving
- Rename type(s) to stage(s)
- Add missing stage when doing retry
- Require variable keys to be not-empty and unique

v7.13.1
- Fix: user could steal specific runner
Expand Down
3 changes: 3 additions & 0 deletions app/models/variable.rb
Expand Up @@ -14,5 +14,8 @@
class Variable < ActiveRecord::Base
belongs_to :project

validates_presence_of :key
validates_uniqueness_of :key

attr_encrypted :value, mode: :per_attribute_iv_and_salt, key: GitlabCi::Application.secrets.db_key_base
end

0 comments on commit 1fdd1fa

Please sign in to comment.