BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6c168d40
Commit
6c168d40
authored
Sep 16, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '20870-secret-variables-sorted-by-key' into 'master'
Sort secret keys by key instead of id. Closes #20870 See merge request !6275
parents
55246824
43d2cd51
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
variable.rb
app/models/ci/variable.rb
+4
-2
_table.html.haml
app/views/projects/variables/_table.html.haml
+1
-1
No files found.
app/models/ci/variable.rb
View file @
6c168d40
module
Ci
class
Variable
<
ActiveRecord
::
Base
extend
Ci
::
Model
belongs_to
:project
,
class_name:
'::Project'
,
foreign_key: :gl_project_id
validates_uniqueness_of
:key
,
scope: :gl_project_id
...
...
@@ -11,7 +11,9 @@ module Ci
format:
{
with:
/\A[a-zA-Z0-9_]+\z/
,
message:
"can contain only letters, digits and '_'."
}
attr_encrypted
:value
,
scope
:order_key_asc
,
->
{
reorder
(
key: :asc
)
}
attr_encrypted
:value
,
mode: :per_attribute_iv_and_salt
,
insecure_mode:
true
,
key:
Gitlab
::
Application
.
secrets
.
db_key_base
,
...
...
app/views/projects/variables/_table.html.haml
View file @
6c168d40
...
...
@@ -9,7 +9,7 @@
%th
Value
%th
%tbody
-
@project
.
variables
.
each
do
|
variable
|
-
@project
.
variables
.
order_key_asc
.
each
do
|
variable
|
-
if
variable
.
id?
%tr
%td
=
variable
.
key
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment