summaryrefslogtreecommitdiff
path: root/app/models/key.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@15-3-stable-eev15.3.0-rc42GitLab Bot2022-08-181-0/+1
|
* Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42GitLab Bot2022-07-201-7/+7
|
* Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42GitLab Bot2022-06-201-2/+22
|
* Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42GitLab Bot2022-05-191-8/+7
|
* Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42GitLab Bot2022-04-201-3/+9
|
* Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42GitLab Bot2022-02-181-1/+1
|
* Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42GitLab Bot2022-01-201-1/+1
|
* Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42GitLab Bot2021-11-181-1/+1
|
* Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42GitLab Bot2021-06-161-1/+4
|
* Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42GitLab Bot2021-05-191-1/+1
|
* Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43GitLab Bot2021-04-201-0/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-131-0/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-03-121-13/+10
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-271-2/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2020-01-081-6/+2
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-12-171-0/+4
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-12-111-1/+8
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-09-131-0/+2
|
* Resolved EE differences in app/views/profiles/keysce-fe-fix-ee-diff-profile-key-viewsPaul Slaughter2019-05-311-0/+5
| | | | | | | | **How?** It creates a base method `can_delete?` on Key which will always be true in CE and is overridden in EE. Added changelog entry
* Inherit from ApplicationRecord instead of ActiveRecord::BaseNick Thomas2019-03-281-1/+1
|
* Use a method for the has_many :keys in Projectuser-model-merge-conflictsYorick Peterse2018-11-011-0/+4
| | | | | | This moves the `where` in the `has_many :keys` association in Project to the Key model. This allows EE to override this method, instead of modifying the source code directly.
* Disable existing offenses for the CodeReuse copsYorick Peterse2018-09-111-0/+8
| | | | | This whitelists all existing offenses for the various CodeReuse cops, of which most are triggered by the CodeReuse/ActiveRecord cop.
* Enable frozen string in app/models/*.rbrepo-forks/gitlab-ce-frozen-string-enable-app-modelsgfyoung2018-07-261-0/+2
| | | | Partially addresses #47424.
* Revert "Merge branch ↵Rubén Dávila2018-02-151-4/+3
| | | | | | 'rd-43185-revert-sanitize-extra-blank-spaces-used-when-uploading-a-ssh-key' into 'master'" This reverts commit e607fd796657afd214b8f25201919d3e33b3f35f.
* Revert "Merge branch ↵rd-43185-revert-sanitize-extra-blank-spaces-used-when-uploading-a-ssh-keyRubén Dávila2018-02-121-3/+4
| | | | | | | 'rd-40552-gitlab-should-check-if-keys-are-valid-before-saving' into 'master'" This reverts commit a58f8c32c62bcf5824d1fe1d0de53e9bda974d65, reversing changes made to cd5d75c362cdf06efb8174eddfbd0f4b65687dec.
* Merge branch 'rd-40552-gitlab-should-check-if-keys-are-valid-before-saving' ↵Douwe Maan2018-02-021-4/+3
|\ | | | | | | | | | | | | | | | | into 'master' Sanitize extra blank spaces used when uploading a SSH key Closes #40552 See merge request gitlab-org/gitlab-ce!16821
| * Sanitize extra blank spaces used when uploading a SSH keyRubén Dávila2018-02-011-4/+3
| |
* | use Gitlab::UserSettings directly as a singleton instead of ↵Mario de la Ossa2018-02-021-3/+2
|/ | | | including/extending it
* Consistently schedule Sidekiq jobsdm-application-workerDouwe Maan2017-12-051-0/+1
|
* Cache the number of user SSH keyscache-user-keys-countYorick Peterse2017-11-161-0/+8
| | | | | | | | | By caching the number of personal SSH keys we reduce the number of queries necessary on pages such as ProjectsController#show (which can end up querying this data multiple times). The cache is refreshed/flushed whenever an SSH key is added, removed, or when a user is removed.
* Ensure key fingerprints are generated correctly when modifiedNick Thomas2017-10-031-0/+1
|
* Stop using Sidekiq for updating Key#last_used_atremove-use-key-workerYorick Peterse2017-09-201-6/+1
| | | | | | | | | | | | | | | This makes things simpler as no scheduling is involved. Further we remove the need for running a SELECT + UPDATE just to get the key and update it, whereas we only need an UPDATE when setting last_used_at directly in a request. The added service class takes care of updating Key#last_used_at without using Sidekiq. Further it makes sure we only try to obtain a Redis lease if we're confident that we actually need to do so, instead of always obtaining it. We also make sure to _only_ update last_used_at instead of also updating updated_at. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36663
* created services for keyshaseeb2017-09-151-5/+0
|
* Address review commentsNick Thomas2017-08-301-1/+0
|
* Rework the permissions model for SSH key restrictionsNick Thomas2017-08-301-25/+12
| | | | | | | | | | | | | | | `allowed_key_types` is removed and the `minimum_<type>_bits` fields are renamed to `<tech>_key_restriction`. A special sentinel value (`-1`) signifies that the key type is disabled. This also feeds through to the UI - checkboxes per key type are out, inline selection of "forbidden" and "allowed" (i.e., no restrictions) are in. As with the previous model, unknown key types are disallowed, even if the underlying ssh daemon happens to support them. The defaults have also been changed from the lowest known bit size to "no restriction". So if someone does happen to have a 768-bit RSA key, it will continue to work on upgrade, at least until the administrator restricts them.
* Add settings for minimum key strength and allowed key typeNick Thomas2017-08-301-1/+44
| | | | | | | | This is an amalgamation of: * Cory Hinshaw: Initial implementation !5552 * Rémy Coutable: Updates !9350 * Nick Thomas: Resolve conflicts and add ED25519 support !13712
* fix #35133 strip new lines from ssh keyshaseeb2017-08-031-2/+1
|
* Don’t schedule workers from inside transactionsDouwe Maan2017-06-021-5/+4
|
* Enable the Style/TrailingCommaInArguments copRémy Coutable2017-05-101-1/+1
| | | | | | Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Record used SSH keys only once per dayrecord-used-ssh-keys-once-per-dayAdam Niedzielski2017-01-201-1/+6
| | | | | Use Gitlab::ExclusiveLease to make sure that we enqueue Sidekiq job at most once per day for given key.
* Record and show last used date of SSH KeysVincent Wong2017-01-091-0/+4
| | | | | | | | Addresses: Issue #13810 1. Adds a last_used_at attribute to the Key table/model 2. Update a key's last_used_at whenever it gets used 3. Display how long ago an ssh key was last used
* Merge CSSFilipa Lacerda2016-12-121-4/+12
|\
| * Use :maximum instead of :within for length validators with a 0..N range25209-improve-length-validatorsRémy Coutable2016-12-061-4/+12
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Don't notify user for deploy keys, feedback:Lin Jen-Shin2016-11-181-4/+4
|/ | | | https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7383#note_18517263
* Use setter for key instead AR callbackSemyon Pupkov2016-11-161-3/+4
| | | | ref: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6763
* Add simple identifier to public SSH keysKeith Pope2016-08-021-2/+3
|
* Remove Duplicated keys add UNIQUE index to fingerprint18697-uniqueness-key-validationPaco Guzman2016-06-201-1/+1
|
* Add leading comment space copissue_15557Felipe Artur2016-05-311-1/+1
|
* Remove the annotate gem and delete old annotationsJeroen van Baarsen2016-05-091-15/+0
| | | | | | | | | In 8278b763d96ef10c6494409b18b7eb541463af29 the default behaviour of annotation has changes, which was causing a lot of noise in diffs. We decided in #17382 that it is better to get rid of the whole annotate gem, and instead let people look at schema.rb for the columns in a table. Fixes: #17382
* Annotate the modelsZeger-Jan van de Weg2016-05-061-3/+3
|