Commit graph

123 commits

Author SHA1 Message Date
Nenad Vujicic
92f9d57a40 Added bootstrap alert when body preview is empty
Fixes #3748. Added check to SiteController#preview to detect if (message, diary entry, diary entry comment) body is empty and if positive, returns rendered bootstrap alert "Nothing to preview" to be displayed in richtext_field.
2024-07-31 00:24:45 +02:00
Anton Khorev
2cf3a52d40 Add title to copyright page 2024-06-07 12:51:38 +03:00
Martin Raifer
ed15352f56
reintroduce unsafe-eval CSP rule for iD
fixes https://github.com/openstreetmap/iD/issues/10265
2024-05-29 11:26:08 +02:00
Tom Hughes
c834f9afe7 Merge remote-tracking branch 'upstream/pull/4841' 2024-05-27 10:33:34 +01:00
Martin Raifer
416fca5703
update script-src CSP rules for iD 2024-05-26 15:24:57 +02:00
Martin Raifer
4ef6876b32
allow data URIs for images in iD 2024-05-26 15:01:30 +02:00
Tom Hughes
20bdbb05c3 Switch to using rails builtin content security policy support 2024-05-22 16:38:59 +01:00
Anton Khorev
07954549b9 Allow arrays of names in map key entries 2023-12-20 04:03:22 +03:00
Anton Khorev
d9b9e13be1 Allow to omit max_zoom if next map key entry has min_zoom 2023-12-08 13:21:57 +03:00
Anton Khorev
9ac70151a8 Load map key data in controller 2023-12-08 12:55:18 +03:00
Dimitar
318064b2a7 Facelift offline.html and use Bootstrap classes for "notifications"
Update site_controller_test.rb

Update site_controller_test.rb

Remove whitespace

Reset Settings.status after test is done

Update test for offline page

Update site_controller.rb

Fix indentation

Update offline controller

Update offline.html.erb

Remove flash CSS classes and fix missed tests

Updated tests

Address most PR comments

Update _flash.html.erb

Update _flash.html.erb

Update edit.html.erb

Update offline.html.erb
2023-03-26 13:57:51 +03:00
Andy Allan
9748ce301c Move browse#note to notes#show
This allows a more resourceful routing approach.
2023-02-01 17:13:41 +00:00
Adam Hoyle
7e5cbe87ed Merge branch 'master' into feature/add-communities-page
# Conflicts:
#	Gemfile.lock
#	package.json
#	yarn.lock
2022-09-10 16:13:17 +01:00
Andy Allan
bb7f5ac2c8 Switch to using FrozenRecord for loading communities
This allows us to query the records to get the local chapters, which
is more flexible and allows us to use other resources too.
2022-07-27 16:19:08 +01:00
Tom Hughes
aa32dba482 Require a logged in user for the iD frame
The frame will error if the user is not logged in as it wants
to be able to access their OAuth token.
2022-07-26 00:52:22 +01:00
Andy Allan
e530d4f54d Move the i18n loading to an initializer
Use after_initialize to avoid rails resetting the translations
2022-03-02 16:24:02 +00:00
Adam Hoyle
764f808d5a Remove hand rolled i18n support 2021-11-24 22:47:19 +00:00
Adam Hoyle
a57bc158fd Improve encapsulation / location of osm-community-index files 2021-09-08 20:44:35 +01:00
Adam Hoyle
4bcc88161c Refactor osm-community-index and local chapters models 2021-09-08 18:11:50 +01:00
Adam Hoyle
8f529a337f Localise local chapters 2021-08-24 21:38:05 +01:00
Adam Hoyle
26aecfb2bf add route to pass locale 2021-08-10 10:13:24 +01:00
Adam Hoyle
86912a61df stub model and show in view 2021-08-08 23:28:44 +01:00
Adam Hoyle
d8d1ab1776 add route for communities 2021-08-07 15:46:39 +01:00
Tom Hughes
0ff89c31e4 Remove both Potlatch versions
Fixes #2622
2021-01-05 21:18:45 +00:00
Tom Hughes
d4130bcac8 Fix the Redirect warnings from Brakeman
Unfortunately I've had to leave the check disabed as Brakeman
can't see inside the safe_referer method so doesn't realise that
it is cleaning the referer.
2020-07-22 19:23:46 +01:00
Tom Hughes
66ec3cd845 Add blob to frame-src in CSP for iD
Fixes #2582
Closes #2583
2020-04-09 18:43:12 +01:00
Tom Hughes
3426976606 Merge remote-tracking branch 'upstream/pull/2444' 2019-12-30 22:34:24 +00:00
Tom Hughes
ac6a872a48 Avoid errors when /edit is called on an invalid object 2019-12-16 21:23:09 +00:00
Mayank Tankhiwale
9f7ec064e4 Fix #2402
1. Modified about routes
2. Accept the new params in site#about
3. Update about.html.erb
2019-11-23 20:26:19 +05:30
Andy Allan
f77d4dc4f7 Avoid stating the action to render when it just matches the current action 2019-06-26 14:50:35 +02:00
Tom Hughes
141df02e67 Move status into the settings object
Only the very early boot code needs to look at the value
from the environment directly.
2019-03-17 11:15:34 +00:00
Tom Hughes
15c96081a6 Allow connect_src to match all sites in Potlatch
It seems that Safari matches connections made from a flash application
against connect_src while Firefox uses object_src instead.

Fixes #2067
2018-11-19 17:34:47 +00:00
Andy Allan
fb2c1f6cfd Refactor site#welcome to use abilities instead of require_user 2018-10-10 11:49:45 +02:00
Andy Allan
420a7289a0 Merge branch 'authz' of https://github.com/rubyforgood/openstreetmap-website into rubyforgood-authz 2018-10-10 11:26:30 +02:00
Tom Hughes
640ea955fe Remove script sources which are no longer needed by iD 2018-07-26 17:44:16 +01:00
Chris Flipse
b16aa11f65 fix tests for site controller 2018-06-17 13:56:23 -04:00
Andy Allan
ffa65d4d72 Add cancancan and the first ability definitions for site_controller 2018-06-17 13:56:23 -04:00
Tom Hughes
a516d13d33 Allow iD to access ESRI imagery metadata 2018-06-06 14:25:52 +01:00
Tom Hughes
c5d3335a6c Allow inline styles in iD 2018-05-18 20:28:09 +01:00
Tom Hughes
9227f6aecd Allow iD to access wikidata 2018-05-16 11:36:46 +01:00
Tom Hughes
8d41015673 Allow iD to access wikipedia 2018-05-16 08:48:38 +01:00
Tom Hughes
a83030dab7 Fix new rubocop warnings 2018-01-22 18:55:45 +00:00
Tom Hughes
afa5d420d3 Allow iD to fetch gpx files from arbitrary locations 2017-11-24 08:38:51 +00:00
Tom Hughes
527ec293c2 Fix security policy for mapillary in iD 2017-11-24 01:09:27 +00:00
Tom Hughes
4950ae3c1f Allow iD to connect to nominatim 2017-11-24 00:10:38 +00:00
Tom Hughes
7ce94ad0ec Add openstreetcam.org to security policy for iD 2017-11-16 10:17:22 +00:00
Andy Allan
6f89da05d1 Use current_user to represent the currently logged in user.
This is already used by the oauth plugin, and is a general rails convention.
2017-07-12 16:10:50 +01:00
Tom Hughes
18c8946556 Use explicit to_unsafe_h method when converting parameters to a hash 2017-06-05 22:44:15 +01:00
Tom Hughes
2357118c46 Avoid using format as a URL parameter name
This prevents rails confusing it with the builtin format
parameter derived from the URL extension.
2017-06-03 12:08:35 +01:00
Tom Hughes
ff97501ed0 Remove all use of the :text option to render
It doesn't actually do what it says, as it sets the content type
to text/html not text/plain so is just confusing and as a result
has been deprecated in newer rails versions.
2017-06-02 19:12:05 +01:00