summaryrefslogtreecommitdiff
path: root/app/models/concerns/token_authenticatable.rb
Commit message (Collapse)AuthorAgeFilesLines
* Create idea of read-only databasetc-geo-read-only-ideaToon Claes2017-10-061-1/+3
| | | | | | | | | | | | In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo secondary node). But in GitLab CE it also might be useful to have the "read-only" idea around. So port it back to GitLab CE. Also having the principle of read-only in GitLab CE would hopefully lead to less errors introduced, doing write operations when there aren't allowed for read-only calls. Closes gitlab-org/gitlab-ce#37534.
* Re-enable SqlInjection and CommandInjectionBrian Neel2017-08-081-1/+2
|
* Allow users to seed the initial runner registration token using an ↵DJ Mountney2016-12-011-0/+4
| | | | | | | environment variable This is useful for when runner is bundled with gitlab, like in a kubernetes stack, and we want the runner to be able to register with gitlab as soon as they both come up.
* Use separate email-friendly token for incoming email and let incomingDouwe Maan2016-11-071-3/+7
| | | | email token be reset
* Enable Rubocop cops for invalid access modifiersrubocop/enable-access-modifiers-copsGrzegorz Bizon2016-07-191-1/+1
| | | | | | | | | | | | | | | This enables following cops: Check for useless access modifiers Lint/UselessAccessModifier Checks for attempts to use `private` or `protected` to set the visibility of a class method, which does not work. Lint/IneffectiveAccessModifier This also disables two false possitives in concerns.
* Fix some useless access modifiers in the codeGrzegorz Bizon2016-07-191-14/+14
|
* Use method that creates runners registration tokenGrzegorz Bizon2015-12-231-1/+0
| | | | `runners_registration_token` now creates a new token if it is blank.
* Add method that persist ensured token in `TokenAuthenticatable`Grzegorz Bizon2015-12-231-2/+13
|
* Fix method that ensures authentication tokenGrzegorz Bizon2015-12-231-6/+2
| | | | | | Until now, `ensure_#{token_filed_name}` method didn't persist new token in database. This closes #4235.
* Fixed Rubocop offensesGabriel Mazetto2015-12-151-2/+2
|
* Make sure that token `ensure_*` method always returns a tokenGrzegorz Bizon2015-12-111-2/+6
|
* Use `save!` when generating new token in `TokenAuthenticatable`Grzegorz Bizon2015-12-111-1/+1
|
* Refactor `TokenAuthenticatable` to improve reusabilityGrzegorz Bizon2015-12-111-16/+24
| | | | | | | This adds a ability to use multiple different authentication token fields in other models. From now on it is necessary to add authentication token field manually in each class that implements this mixin.
* Try to keep token authenticable compatibilityMarin Jankovski2014-07-091-0/+31