From 4ec1ebade400725266d65dcdd368b4cee238284e Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Tue, 29 May 2018 19:11:28 +0200 Subject: Feed attributes only for admin (#1905) * Feed attributes only for admin https://github.com/FreshRSS/FreshRSS/pull/1838 * Changelog 1905 https://github.com/FreshRSS/FreshRSS/pull/1905 --- app/Controllers/subscriptionController.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'app/Controllers/subscriptionController.php') diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index 860cd912f..701a588e0 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -98,10 +98,15 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { $feed->_attributes('mark_updated_article_unread', Minz_Request::paramTernary('mark_updated_article_unread')); $feed->_attributes('read_upon_reception', Minz_Request::paramTernary('read_upon_reception')); - $feed->_attributes('ssl_verify', Minz_Request::paramTernary('ssl_verify')); - $timeout = intval(Minz_Request::param('timeout', 0)); - $feed->_attributes('timeout', $timeout > 0 ? $timeout : null); + if (FreshRSS_Auth::hasAccess('admin')) { + $feed->_attributes('ssl_verify', Minz_Request::paramTernary('ssl_verify')); + $timeout = intval(Minz_Request::param('timeout', 0)); + $feed->_attributes('timeout', $timeout > 0 ? $timeout : null); + } else { + $feed->_attributes('ssl_verify', null); + $feed->_attributes('timeout', null); + } $values = array( 'name' => Minz_Request::param('name', ''), -- cgit v1.2.3