Tom Hughes
bfffe7ed96
Prefer string interpolation to concatenation
2020-11-13 11:32:28 +00:00
Tom Hughes
0e2a66e8de
Fix new rubocop warnings
2020-08-06 18:42:16 +01:00
Andy Allan
a219df24ca
Ensure that urls are only valid if the entire string is a url
...
This replaces our homegrown regexps (that didn't quite work) with
ruby built-in regexps, and uses the termination anchor to ensure
that the entire string, not just the first part, is validated.
2020-04-01 17:53:37 +02:00
Andy Allan
a41d500b9f
Create an ApplicationRecord for models to inherit from
...
This is the default for Rails 5+, and also paves the way for
multiple database support.
2019-11-27 11:50:48 +01:00
Andy Allan
d102c9aaf4
Move all settings to settings.yml
...
We leave the STATUS setting alone, since it's required before rails
boots. The test-specific settings now live in config/settings/test.yml
2019-03-13 18:06:23 +01:00
Andy Allan
c4a192f436
Remove unnecessary requires from app
2019-02-06 12:26:30 +01:00
Tom Hughes
64146b4f36
Fix Style/SafeNavigation rubocop warnings
2018-09-22 17:21:06 +01:00
Tom Hughes
6c2093b29d
Fix new rubocop warnings
2018-09-22 17:12:29 +01:00
Tom Hughes
1f2ac59d1d
Fix new rubocop warnings
2018-03-26 19:00:03 +01:00
Tom Hughes
be86e4824f
Convert various URLs to https
2018-01-08 20:18:21 +00:00
Tom Hughes
b6b9d543ac
Fix rubocop warnings
2017-10-29 19:43:02 +00:00
Andy Allan
b2a8df0bd7
Add annotate gem and associated rake task. Annotate models.
2017-10-22 22:18:26 +01:00
Tom Hughes
5b33f3f8e3
Fix rubocop warnings
2017-06-02 00:08:30 +01:00
Tom Hughes
e17b89e89f
Fix rubocop warnings
2016-10-20 22:35:51 +01:00
Tom Hughes
8fe1899596
Fix rubocop warnings
2016-01-19 09:51:24 +00:00
Tom Hughes
098d1fc235
Allow customer URL schemas for OAuth callback URLs
...
Fixes #1019
2015-07-28 12:13:18 +01:00
Tom Hughes
2af0840ff3
Fix style issues found by new rubocop version
2015-04-14 09:38:24 +01:00
Tom Hughes
dbe165bbb3
Fix some rubocop rails style issues
2015-02-26 00:12:54 +00:00
Tom Hughes
8e404f3a46
Fix some more rubocop style issues
2015-02-20 20:39:52 +00:00
Tom Hughes
dc2a2c8ebd
Standardise on double quoted strings
2015-02-20 19:47:26 +00:00
Tom Hughes
5cbd4038ed
Fix rubocop style issues
2015-02-20 08:56:16 +00:00
Tom Hughes
baf10cd392
Fix rubocop lint issues
2015-02-20 08:56:16 +00:00
Tom Hughes
ef7f3d800c
Fix most auto-correctable rubocop issues
2015-02-20 08:56:16 +00:00
Tom Hughes
34e3e51456
Cleanup trailing whitespace
2015-02-20 08:56:16 +00:00
Tom Hughes
f0feca800d
Replace attr_accessible with strong parameters
2013-09-21 11:35:46 +01:00
Tom Hughes
97e0d5ad1f
Add a new write_notes permission needed for OAuth access to notes
2013-03-28 18:50:18 +00:00
Tom Hughes
53fe84fbef
Delete tokens for an application when the application is deleted
2012-04-23 21:30:41 +01:00
Tom Hughes
1340fca8f1
Turn on mass assignment protection
...
Require any attribute that is going to be mass assigned to be
whitelisted, and whitelist those attributes which need it
2012-03-06 08:54:45 +00:00
Tom Hughes
7b89dc6349
Make OAuth work again
2011-11-16 21:13:25 +00:00
Tom Hughes
8ae5d94b2f
Update some more queries to use AREL in place of deprecated methods
2011-11-14 09:42:51 +00:00
Tom Hughes
17f4e58e46
Use before_validation with :on rather than before_validation_on_xxx
2011-11-14 09:42:40 +00:00
Tom Hughes
6d5c551a7c
Simplify URL scheme name matching in OAuth callback URLs a little
2011-05-11 22:24:38 +01:00
Mendhak
9375b397fa
Allow any valid (per RFC 3986) scheme name in OAuth callback URLs
...
Changed the callback_url regex so that you can have custom schemes such
as myapp: or my-lovely-app: instead of just http and https. This should
help with mobile development where users can authorize with OSM in their
browser and are automatically redirected to the registered app.
2011-05-11 22:23:06 +01:00
Tom Hughes
0a52a4eb07
Implement automatic OAuth setup for Potlatch 2
2010-11-29 12:20:22 +00:00
Tom Hughes
1c3a9ee62b
Update oauth models and controllers for OAuth 1.0a support
2010-09-21 16:20:30 +01:00
Tom Hughes
406b46e49b
Revert "Switch to using oauth-plugin as a gem"
...
This reverts commit 41a123334b
.
2010-06-07 16:01:04 +01:00
Tom Hughes
41a123334b
Switch to using oauth-plugin as a gem
...
Use the oauth-plugin as a gem instead of carrying a local copy.
This also required that commit eff06faf46
be
reverted as it changed the plugin. I don't think the cosmetic improvement
from that patch is worth the hassle of carrying local changes to the plugin.
2010-05-24 12:58:27 +01:00
Matt Amos
eff06faf46
Moved find_token method into the token class, since that seems a more appropriate place for it.
2009-08-03 14:00:29 +00:00
Matt Amos
b8f6dbd403
Adding initial version of the OAuth token authentication method. This adds basic OAuth support for registering apps, getting and revoking keys, etc... The tokens come with 6 separate permissions bits; read/write user preferences, write diaries, write API and read/write GPS traces. Needs more tests.
2009-06-22 16:54:37 +00:00