Commit graph

25 commits

Author SHA1 Message Date
Tiago Botelho
961255b107 Adds remote mirror table migration 2018-05-07 12:00:13 +02:00
Tiago Botelho
9a13059332 Backports every CE related change from ee-5484 to CE 2018-05-07 11:59:51 +02:00
Mayra Cabrera
8c27658043 Removes deploy tokens presenter 2018-04-06 21:20:17 -05:00
Mayra Cabrera
2991381630 Addresses database comments
- Adds a default on expires_at datetime
- Modifies deploy tokens views to handle default expires at value
- Use datetime_with_timezone where possible
- Remove unused scopes
2018-04-06 21:20:17 -05:00
Mayra Cabrera
a475411f43 Fixes broken schema and minor changes 2018-04-06 21:20:16 -05:00
Kamil Trzciński
2c6c61815e Get rid of Redis when dealing with deploy tokens
We use controller actions to pass a newly created token and errors
2018-04-06 21:20:16 -05:00
Mayra Cabrera
8315861c9a Include ProjectDeployTokens
Also:
- Changes scopes from serializer to use boolean columns
- Fixes broken specs
2018-04-06 21:20:16 -05:00
Mayra Cabrera
345ac03b7a Address UX review
- Keep 'Deploy Section' open upon save, otherwise the token might get
  lost
- When an error appears, display the error inside the form and also keep
  the Deploy Section open
- Changue copy of revoke modal
2018-04-06 21:20:16 -05:00
Mayra Cabrera
db18993f65 Create barebones for Deploytoken
Includes:
- Model, factories, create service and controller actions
- As usual, includes specs for everything
- Builds UI (copy from PAT)
- Add revoke action

Closes #31591
2018-04-06 21:20:16 -05:00
Jan
c2823a4bda Resolve "Protected branches count is wrong when a wildcard includes several protected branches" 2018-04-04 10:37:44 +00:00
James Edwards-Jones
96106287db Deduplicate protected ref human_access_levels
Previously these were duplicated so they could be different for push/merge,
but this was no longer necessary after
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11232
2017-11-24 13:47:03 +00:00
James Edwards-Jones
07d7d8e659 Renamed ProtectedTag push_access_levels to create_access_levels 2017-04-04 03:38:58 +01:00
James Edwards-Jones
f9e849c076 Cleaned up duplication with ProtectedRefAccess concern 2017-04-04 02:59:37 +01:00
James Edwards-Jones
ff2713a570 Fix typos in ProtectedRef concern and whitespace detected by rubocop 2017-04-03 22:04:37 +01:00
James Edwards-Jones
9f4b8dba80 Clean up non TODO rubocop errors 2017-04-03 20:06:06 +01:00
James Edwards-Jones
b8c7bef5c0 Extracted ProtectableDropdown to clean up Project#open_branches
Makes it clear this is only used in dropdowns, instead of cluttering up Project class. Since we only care about branch names, it is also possible to refactor out a lot of the set/reject logic.

A benchmark on Array/Set subtraction favoured using Arrays. This was with 5000 ‘branches’ and 2000 ‘protections’ to ensure a similar comparison to the commit which introduced using Set for intersection.

Comparison:
   array subtraction:      485.8 i/s
     set subtraction:      128.7 i/s - 3.78x slower
2017-04-03 17:19:53 +01:00
James Edwards-Jones
f51eac1df9 Settings::RepositoryController includes protected tags in JS 2017-03-31 19:37:15 +01:00
Phil Hughes
12fe94c388 Merge branch 'master' into 26732-combine-deploy-keys-and-push-rules-and-mirror-repository-and-protect-branches-settings-pages 2017-03-07 11:40:27 +00:00
Jose Ivan Vargas
bd9887e617 Fixed repository_controller_spec
also added an #open_branches private method
2017-03-06 09:47:44 -06:00
Jose Ivan Vargas
43958926c5 Added delegations to comply with the new rubocop rules
Also fixed the deploy_keys view and moved the code from the repository_helper
to the repository_controller
2017-03-06 09:47:44 -06:00
Jose Ivan Vargas
a29517dd0c Added tests for the repository_controller and repository_helper
Added specs for the deploy_keys_presenter and added a new method in the presenter
called #key_available?

Fixed some minor UX inconsistencies and added a concern to handle
redirection
2017-03-06 09:47:44 -06:00
Jose Ivan Vargas
336b818bcb Added access spec tests
Also created changelog and removed redundant code
2017-03-06 09:47:44 -06:00
Grzegorz Bizon
5967c17e80 Introduced the deploy keys presenter 2017-03-06 09:47:44 -06:00
Jose Ivan Vargas
0b74ae849d Created the gear settings entry and created a way to initialize both sections with one controller
Changed views to partials, created the repository view,
created a repository_helper to further aid the creation of variables
across different controllers
2017-03-06 09:47:43 -06:00
Jose Ivan Vargas
c51d720366 Added repository controller and route for the settings namespace 2017-03-06 09:47:43 -06:00