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
This commit is contained in:
Alexandre Alapetite
2018-05-29 19:11:28 +02:00
committed by GitHub
parent 18443963b9
commit 4ec1ebade4
3 changed files with 13 additions and 5 deletions

View File

@@ -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', ''),