Commit graph

2610 commits

Author SHA1 Message Date
Frank Rousseau
f66bd9e1af Add exception handlers in base API controller
* For record not found returns a 404 response
* For wrong parameters returns a 400 response
* For other exceptions returns a 500 response
2018-11-01 13:56:18 +01:00
theworldbright
e84e3e64c6 Add likes API route 2018-11-01 13:56:18 +01:00
theworldbright
44742109b0 Add streams API routes 2018-11-01 13:56:18 +01:00
theworldbright
ea3395378f Combine Comment index with Post show API route 2018-11-01 13:56:18 +01:00
theworldbright
47c7de22ae Add comments API routes 2018-11-01 13:56:18 +01:00
theworldbright
c432bb4891 Add posts API routes 2018-11-01 13:56:18 +01:00
Dennis Schubert
a928e40d7f
Merge branch 'next-minor' into develop 2018-10-14 06:03:12 +02:00
Zachary Rabinovich
c4fed4bbcc
Add the ability to assign roles in the admin panel
closes #7868
2018-10-14 06:03:06 +02:00
Benjamin Neff
ea15403d57
Merge pull request #7655 from Flaburgan/6721-fix-upload-progress-bar
Fix multiple photos upload progress bar
2018-07-11 01:37:02 +02:00
Benjamin Neff
dcbdb69e22
Merge branch 'next-minor' into develop 2018-07-11 01:35:50 +02:00
cmrd Senya
6f812a5b8f
Add LinksController
LinksController redirects requests for provided diaspora:// links to
respective entities urls.
2018-07-11 01:24:28 +02:00
flaburgan
af02d01d41 Fix progress when uploading multiple photo at the same time 2018-07-09 17:48:30 +02:00
Benjamin Neff
66175f6908
Merge branch 'next-minor' into develop 2018-04-12 01:56:07 +02:00
Benjamin Neff
686310fb8e
Simplify /podmin redirect
Some podmins were confuse how they can disable this redirect and I think
the rule with two users can actually be a little confusing. I think the
main goal of this page to give the podmin a little start and I think
after they configured everything, the pod works and they found the link
to the wiki to make themself an admin, it is OK to remove the redirect.

Also it's bad for single-user pods where this page always stays active,
even if they are an admin, but have only one user. It's more useful for
single-user pods to have the login on the home page.

closes #7783
2018-04-12 01:55:46 +02:00
Steffen van Bergerem
01ae004518
Make public stream accessible for logged out users
Fixes #6564.

closes #7775
2018-04-12 01:42:17 +02:00
Benjamin Neff
7d6623d069
Remove contacts page on profiles
closes #7769
2018-04-12 01:40:49 +02:00
Benjamin Neff
4fa92c1823
Remove flag for contacts visible to each other
This feature only worked on the same pod and was more confusing than
useful.
2018-04-12 01:39:11 +02:00
Benjamin Neff
c84411ea62
Merge branch 'next-minor' into develop 2018-03-25 08:37:11 +02:00
cmrd Senya
0080a2567f
StatusMessageController#create: respond 422 when aspect_ids are wrong
fixes #3862

closes #7742
2018-03-25 08:31:32 +02:00
Dennis Schubert
1903bfd307
Merge pull request #7581 from Fensterbank/improved-profile-picture-editor
Profile photo upload with cropping function
2018-02-25 04:17:44 +01:00
Frédéric Bolvin
d7abaaced0 implemented new profile photo upload with cropping function 2018-02-16 19:43:32 +01:00
Benjamin Neff
b9787cc632
Start sending the blocking flag 2018-02-01 23:35:35 +01:00
Benjamin Neff
746ff52256
Fix mention in #newhere message when invited by another person
fixes #7701
closes #7702
2018-02-01 23:35:04 +01:00
Benjamin Neff
e0eb76eb2a
Remove aspect_ids parameter from publisher
closes #7683
2017-12-25 20:54:10 +01:00
Rete2
fc33a2ac5d
Create birthday notification and mailer
closes #7624

fixes #1649
2017-12-18 04:34:35 +01:00
Benjamin Neff
0f688b9d73
Group notifications by updated_at
The notifications need to be grouped by the same date as they are
sorted, otherwise the date used for the group doesn't match all
timestamps in the group and also the groups are sorted by the wrong
date.

This fixes #7647, a regression of #7568.

closes #7648
2017-10-20 02:56:06 +02:00
Benjamin Neff
3fafcd9307
The diaspora ID validator now validates if it is lowercase
Relaying relayables will fail with non-lowercase authors.

closes #7625
2017-09-28 23:08:41 +02:00
Benjamin Neff
e82690963d
Add # frozen_string_literal: true to all files 2017-09-17 19:29:15 +02:00
Benjamin Neff
e31c5ff4dc
Handle unauthenticated users for likes/comments of private posts
closes #7583
2017-08-29 12:55:03 +02:00
Benjamin Neff
350e24863f
Allow to load likes and reshares without login 2017-08-29 12:35:48 +02:00
Steffen van Bergerem
48630b3a04
Fix conversation recipient prefill on contacts page
Use the already available contacts data for the prefill
2017-08-29 02:13:27 +02:00
Steffen van Bergerem
666ada44f1
Fix conversation recipient prefill on profile page
Fixes #7586

Use the already available data about the recipient for the prefill
2017-08-29 02:13:27 +02:00
Benjamin Neff
e36b59309f
Remove xml format from posts controller
closes #7584
2017-08-29 01:59:04 +02:00
Steffen van Bergerem
c91c19b633
Order notifications by updated_at instead of created_at
closes #7568
2017-08-26 02:57:16 +02:00
Benjamin Neff
2d06b2865f
Handle when the block to delete doesn't exist
closes #7542
2017-08-16 20:40:11 +02:00
Benjamin Neff
a4d1ad160c
Fix stop ignoring from privacy settings and on mobile
Fixes #7541
2017-08-16 20:39:58 +02:00
Steffen van Bergerem
04735ce9b0
Remove unused interactions method in post controller 2017-08-12 18:09:14 +02:00
Steffen van Bergerem
0bfc2fdd77
Load likes and reshares in the SPV via gon 2017-08-12 18:09:13 +02:00
Steffen van Bergerem
05d19e69ee
Move ExtremePostPresenter methods into PostPresenter, add #with_initial_interactions method 2017-08-12 18:09:12 +02:00
Benjamin Neff
27f3b68f54
Copy headers in OpenidConnect TokenEndpointController 2017-08-12 15:39:24 +02:00
Benjamin Neff
d5f24021a7
Replace render text: ... with render plain: ... 2017-08-12 15:39:22 +02:00
Benjamin Neff
150fea6edb
Replace render nothing: true with head 2017-08-12 15:39:22 +02:00
Benjamin Neff
80c241bc7a
Replace redirect_to :back with redirect_back
Also remove some unused html responses
2017-08-12 15:39:22 +02:00
Benjamin Neff
2b911b0131
Permit parameters before using them
ActionController::Parameters no longer inherits from HashWithIndifferentAccess
2017-08-12 15:39:21 +02:00
Benjamin Neff
c382321934
Replace old ..._filter with new ..._action 2017-08-12 15:39:21 +02:00
Benjamin Neff
e076910b74
Prepend protect_from_forgery because this defaults to false now 2017-08-12 15:39:21 +02:00
Benjamin Neff
01ca08b86f
Merge pull request #7436 from SuperTux88/federation-update
Federation gem update
2017-07-14 01:31:32 +02:00
Benjamin Neff
58609e42d7
Merge branch 'next-minor' into develop 2017-07-05 02:10:24 +02:00
flaburgan
2782edc780
Refactor partials + pronto 2017-07-05 01:50:16 +02:00
SansPseudoFix
276b640418
Add admin views to mobile, use partials for common code with desktop 2017-07-05 01:50:10 +02:00
Benjamin Neff
4f9e560ab3
Use RFC 7033 webfinger from diaspora_federation gem 2017-07-03 03:14:41 +02:00
Benjamin Neff
246d1ebbdf
Remove legacy post xml
This was used for the old post fetching

Related to diaspora/diaspora_federation#31
2017-07-03 03:14:40 +02:00
Benjamin Neff
95def40c55
Make Message entity non-relayable
Related to #36
2017-07-02 23:56:00 +02:00
Benjamin Neff
44e10a9172
Merge branch 'next-minor' into develop 2017-05-26 01:51:37 +02:00
Mahonri Gibson
5739f67605
Save email without confirmation when podmail is disabled.
fixes #7195

closes #7455
2017-05-26 01:50:55 +02:00
Steffen van Bergerem
c94bac3cf9
Return 406 instead of 500 for statistics.json
Fixes #7406
2017-03-30 23:17:58 +02:00
Dennis Schubert
efdfa749a7
Merge branch 'next-minor' into develop
closes #7398
2017-03-28 01:48:35 +02:00
Steffen van Bergerem
7feed3545c
Create mention success flash message with JavaScript 2017-03-28 01:46:30 +02:00
Steffen van Bergerem
e8ee74ef87
Remove statistics.json 2017-03-27 15:54:34 +02:00
Benjamin Neff
ec2c4a8564
Merge branch 'next-minor' into develop 2017-02-18 23:00:59 +01:00
Steffen van Bergerem
436934e890
Refactor reshares controller using reshare service 2017-02-18 22:59:38 +01:00
Steffen van Bergerem
e74b524e8f
Refactor likes index route 2017-02-18 22:59:37 +01:00
Steffen van Bergerem
2772cb6e0c
Refactor likes controller using like service 2017-02-18 22:59:37 +01:00
Benjamin Neff
03f9147589 Merge branch 'next-minor' into develop 2017-01-15 02:19:10 +01:00
Steffen van Bergerem
b8d3323de0 Return error when unlike failed 2017-01-15 02:17:10 +01:00
cmrd Senya
1fb6040344
new PostController#mentionable_in_comment action 2017-01-13 04:47:50 +02:00
Dennis Schubert
af1c992e01
Merge branch 'next-minor' into develop 2016-12-01 03:17:21 +01:00
cmrd Senya
31a31ecbe1
pass "state" parameter back to openid client 2016-12-01 03:16:50 +01:00
cmrd Senya
33ad411bbd
Mentions in comments backend changes 2016-11-28 15:56:56 +02:00
Steffen van Bergerem
610700ffd5 Refactor conversations controller create
closes #7224
2016-11-26 02:22:07 +01:00
Steffen van Bergerem
0051d6a0b8 Move comment, like and reshare creation error translations
closes #7202
2016-11-22 03:54:56 +01:00
Steffen van Bergerem
f999624967 Use error message from the server when comment failed 2016-11-22 03:53:01 +01:00
Steffen van Bergerem
82e78d3ce8 Use error message from the server when like failed 2016-11-22 03:53:01 +01:00
Steffen van Bergerem
6c5c865b15 Use error message from the server when reshare failed 2016-11-22 03:53:01 +01:00
Augier
af331bfb30
Add collection to app.views.NotificationDropdown and app.views.Notifications
closes #6952
2016-11-18 15:27:37 +01:00
Steffen van Bergerem
9bca03d5e9 Refactor ShareVisibilitesController
closes #7196
2016-11-18 02:10:26 +01:00
Steffen van Bergerem
7cd2232812 Only allow conversation creation in controller with mututal contacts 2016-11-14 03:27:15 +01:00
Augier
f2fdaf1daf Use typeahead on conversations 2016-11-13 20:08:59 +01:00
Steffen van Bergerem
2ec45317a3 Add new JSON endpoint for reshares 2016-11-02 22:59:25 +01:00
Benjamin Neff
16cd4752cb
Move auth_token to users controller
This token is only used for the chat, it isn't an official API.
2016-10-28 00:36:14 +02:00
Steffen van Bergerem
f90812671c
Show error messages from server when aspect membership changes fail
closes #7132
2016-10-27 02:24:58 +02:00
Steffen van Bergerem
3bea40b248
Refactor conversations creation
closes #7131
2016-10-27 02:23:35 +02:00
hilkoc
b7791e6c9d Add user setting for default post visibility
fixes #4319

closes #7118
2016-10-26 02:48:11 +02:00
cmrd Senya
cdcf2d747e
Override forgery settings in controllers
ClientsController and TokenEndpointController are called from the outside,
so CSRF verification prevents them from normal operation.

closes #7062
2016-10-01 10:24:15 +02:00
Augier
e424896822
Fully port conversations to Backbone and drop inbox.js 2016-09-30 00:32:46 +02:00
Benjamin Neff
459ebffa6e
Start background search with gon 2016-09-28 21:59:08 +02:00
Benjamin Neff
b8c76a3317
Trigger getting started with backbone 2016-09-28 21:59:08 +02:00
Benjamin Neff
07a4925f3b
Extract tags autocompletion JS to file 2016-09-28 21:59:08 +02:00
Benjamin Neff
0e5141dd67
Fix mapbox API URL
closes #7066
2016-09-25 02:58:56 +02:00
Steffen van Bergerem
521468986f Remove remotipart gem and remotipart photo uploads
closes #7076
2016-09-12 00:34:44 +02:00
Steffen van Bergerem
546f909658 Fix 500 in html requests for post interactions
closes #7085
2016-09-11 00:21:13 +02:00
Steffen van Bergerem
e27af6ee1a
Redirect logged in users to inviters page when following an invitation link
closes #7061
2016-09-06 05:08:04 +02:00
Steffen van Bergerem
c3de77e0fc
Send notification mails on CSRF fails
closes #7050
2016-09-04 03:26:42 +02:00
Steffen van Bergerem
6ad9000f8c
Sign out users with wrong CSRF tokens
See http://guides.rubyonrails.org/security.html#cross-site-request-forgery-csrf
2016-09-04 03:26:18 +02:00
Steffen van Bergerem
806de7e9d8
Exclude closed accounts from search
closes #7042
2016-09-04 03:22:58 +02:00
Steffen van Bergerem
ce7d008e09
Set grammatical gender in tags controller 2016-09-04 03:02:27 +02:00
Steffen van Bergerem
08794bc47b
Remove user_photo method from users controller
closes #7049
2016-09-04 03:01:51 +02:00
Denis Hovart
bcace2def2 6840 : meta tags update (#6998)
* Adds a new metadata helper and methods to PostPresenter to have metas on post pages.

* Adds tests to post controller to check correctness of metas

* Add methods to PersonPresenter to have metas on profile pages

* Correct meta data helper test

* Update PersonPresenter, add test to PeopleController

* Creates TagPresenter. Display tag metas on tag index page

* Updata meta data helper spec

* Not displaying bio as the description meta on profile page for now. Privacy concerns to be cleared.

* Set meta info as hashes in presenters

* Move original hardcoded metas info to config/defaults.yml

* metas_tags include by default the general metas, update views

* Update code style, clean views

* Renames TagPresenter StreamTagPresenter, updates TagController spec

* Add a default_metas entry to diaspora.yml.example

* Align metas hash in presenters, refactor meta data helper

* Use bio as description meta if user has a public profile

* Rename StreamTagPresenter to TagStreamPresenter
2016-08-18 21:52:39 +02:00
Steffen van Bergerem
7b5ac656a7
Fix conversations autoSuggest showing non-mutual contacts 2016-08-18 13:02:14 +02:00
Steffen van Bergerem
34e3fb2e14
Merge pull request #6991 from cmrd-senya/dropdown-regression
Fix aspect dropdown when person is being fetched
2016-08-18 10:07:35 +02:00
Steffen van Bergerem
993f3d5ab0
Refactor contacts page using pagination 2016-08-18 01:54:43 +02:00
cmrd Senya
6fba0e498e
Use diaspora_id validation from the federation gem
DRY
2016-08-16 12:08:06 +03:00
cmrd Senya
4b3f36e92a
Fix aspect dropdown when person is being fetched
fix #6989
2016-08-15 23:43:24 +03:00
Benjamin Neff
23541546e9 Allow hovercards of remote people when not logged in
In #6603 hovercards were activated for logged out users, but they only
worked for local people. Hovercards on remote-people are important to
get the diaspora-id to search the person on the local pod, if you don't
know who it is.
2016-08-15 01:33:26 +02:00
cmrd Senya
9546fddb9e
[API] don't store ID tokens in DB
fix #6857
2016-08-13 20:09:43 +03:00
Benjamin Neff
bc6c8a0598 disable registration with invite-code when invitations are closed
also display message if the user has no invitations left and refactored
InvitationsController spec and remove unused message parameter
2016-08-13 13:51:28 +02:00
Benjamin Neff
3b1a5c6bdf don't reduce number of invites when registration is open
otherwise the counter goes into negative ;)

also  reset all negative counters
2016-08-13 13:51:02 +02:00
Benjamin Neff
e749bbef15 don't reduce number of available invites if there were errors. 2016-08-13 01:47:27 +02:00
Benjamin Neff
2a553940d4 small design fixes for invites 2016-08-13 01:47:27 +02:00
Benjamin Neff
66b7b7e27a Cleanup legacy invitations from code
Fixes #5116
2016-08-13 01:47:27 +02:00
Benjamin Neff
71ed7446c1 Fix user settings style after submit
Fixed:
* wrong url
* broken navigation
* broken design
after saving the user settings

Fixes #5847
2016-08-11 01:58:47 +02:00
Benjamin Neff
86e75a02bb fix privacy settings form submit 2016-08-10 13:16:59 +02:00
Steffen van Bergerem
cefffc6082
Move contacts search to contacts#index 2016-08-09 19:20:40 +02:00
Steffen van Bergerem
9f28b935b9
Drop contacts.json 2016-08-09 19:20:40 +02:00
Steffen van Bergerem
f1e9c99866
Add contacts search 2016-08-09 19:20:40 +02:00
cmrd Senya
71ecd7b866
Notifications and search page frontend updates
Updates introduce usage of client-side aspect dropdown rendering
2016-08-08 17:22:37 +03:00
cmrd Senya
94ce383498
Introduce NotificationSerializer
And remove the note_html property from the model.
2016-08-08 17:22:30 +03:00
cmrd Senya
a3f208c380
Notifications and search page backend updates
Updates introduce support for preloading contacts to Gon in order
to support client-side rendering of aspect membership dropdown box.
2016-08-08 17:21:38 +03:00
cmrd Senya
82ac611396
Client-side rendering of aspect dropdown for hovercards 2016-08-08 17:21:30 +03:00
cmrd Senya
923fb8a763
Refactor app.views.AspectMembership
in order to support adding new aspect to a dropdown without full
page reload
2016-08-08 17:21:14 +03:00
cmrd Senya
15e0f88758
Rename photos[:count] to photos_count in gon 2016-08-08 17:19:26 +03:00
cmrd Senya
d8687ccb3a
Rename contacts[:count] to contacts_count in gon 2016-08-08 17:19:19 +03:00
Jonne Haß
8cffc5cfbe
bump rails to 4.2.7 2016-07-15 13:48:09 +02:00
aoh0x7DE
d75f795cad Fix issue #6847 (#6905)
* Fix issue #6847
2016-07-06 01:57:23 +02:00
Steffen van Bergerem
bef5241512
Remove unused translations from diaspora.yml, add missing ones 2016-07-05 23:34:31 +02:00
Benjamin Neff
9a3f653c45 fix sender for messages for old pods
Send a second message to remote recipients with conversation-author
as salmon author if the conversation-author is local.

The first dispatch will fail on old pods. New pods will ignore the
second message, if the guid already exist.
2016-06-26 14:05:52 +02:00
Benjamin Neff
57dbcc0e67 add root author to reshare subscribers 2016-06-26 06:21:02 +02:00
Benjamin Neff
03123f1c4d remove more unused code and cleanup 2016-06-26 06:21:01 +02:00
Benjamin Neff
ae05d4e928 use Diaspora::Federation::Dispatcher everywhere 2016-06-26 06:21:01 +02:00
Benjamin Neff
581f8d7226 don't force remove contact on block
this creates inconsistent states, if you remove the block in the future
2016-06-26 06:21:00 +02:00
Benjamin Neff
b1d30aa9cc add more "diaspora to federation entity" methods
move it to Diaspora::Federation::Entities and use it in some tests, but most of the tests can be removed later.
2016-06-26 06:20:58 +02:00
Steffen van Bergerem
b1943f1e46
Redesign default.haml and add a podmin welcome page 2016-06-20 02:03:53 +02:00
Dennis Schubert
230ec02ad7 Merge branch 'stable' into develop 2016-05-06 02:20:38 +02:00
sjain1107
4cd2f1d9c1 Add inviter diaspora-ID to the invite email #6796
closes #6817
2016-05-06 02:20:31 +02:00
cmrd Senya
77bd220e24
Redirect to "/users/sign_in" after AccountDeletion
There is no point to redirect to "/stream" after the account deletion
because the user is logged off.
2016-04-07 12:02:46 +03:00
theworldbright
bb3849e4b1 Fix API privilege scope escalation 2016-03-11 17:18:21 -08:00
Benjamin Neff
0c8588eec8 PostService: create find!
* find returns nil if nothing found
* find! raises errors if not found or not visible
2016-03-07 05:52:54 +01:00
Benjamin Neff
e6b72b526f remove "not public" error page
this is not used anymore:
* not logged in users are redirected to the login page
* logged in users see the normal 404 page
2016-03-07 05:52:54 +01:00
Benjamin Neff
d94eae0d45 refactoring PostService
* move presenters back to controllers, this is view-logic
* use PostService in CommentService
* remove iframe route, this is not used anymore
* id/guid limit at 16 chars, hex(8) is 16 chars long
2016-03-07 05:52:54 +01:00
Benjamin Neff
b398b115bc refactoring CommentService 2016-03-07 05:52:54 +01:00
Benjamin Neff
5a46da47c3 refactoring StatusMessageCreationService
* move parameter normalization back to controller, because this is
  frontend-specific.
* if the StatusMessage is public, save also public photos
2016-03-07 00:00:27 +01:00
Jonne Haß
39ae5e741e Merge pull request #6732 from SuperTux88/cleanup-aspect_visibilities
Cleanup aspect visibilities
2016-03-05 11:05:55 +01:00
Benjamin Neff
acb91c79d2 improve pod connection check
* use port for check
* respect entries in /etc/hosts
* test /.well-known/host-meta
* don't allow redirects to other domains
2016-03-05 02:57:11 +01:00
Benjamin Neff
f913128967 don't add public shareables to aspect_visibilities 2016-03-04 20:13:52 +01:00
Steffen van Bergerem
d9e3f3a734 Merge branch 'stable' into develop 2016-02-23 09:38:53 +01:00
Dennis Schubert
9f2e5b1868 Only mark unread notifications as read otherwise, the UPDATE statement would update all the notifications...
closes #6711
2016-02-23 09:38:34 +01:00
Dennis Schubert
dbdf352a6b Merge branch 'stable' into develop 2016-02-23 06:35:26 +01:00
Steffen van Bergerem
0392549702 Add footer on conversations page
closes #6710
2016-02-23 06:35:15 +01:00
Dennis Schubert
535057aca4 Merge branch 'stable' into develop 2016-02-21 04:26:25 +01:00
Marien Fressinaud
27a8e0fbca Test if user is nil in #reset_authentication_token
Actually it redirects to stream page and says that user is already logged in.

Fix https://github.com/diaspora/diaspora/issues/6326
2016-02-21 04:24:50 +01:00