Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:cerebrate-project/cerebrate into…
Browse files Browse the repository at this point in the history
… develop
  • Loading branch information
iglocska committed Nov 28, 2024
2 parents 0131422 + f7f9392 commit 39e9fb4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Controller/UsersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ public function settings($user_id=false)
{
$editingAnotherUser = false;
$currentUser = $this->ACL->getUser();
if ((empty($currentUser['role']['perm_community_admin']) && empty($currentUser['role']['perm_group_admin'])) || $user_id == $currentUser->id) {
if ((empty($currentUser['role']['perm_community_admin']) && empty($currentUser['role']['perm_group_admin'])) || empty($user_id) || $user_id == $currentUser->id) {
$user = $currentUser;
} else {
$user = $this->Users->get($user_id, [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,14 @@ protected function generateSettingsConfiguration()
'Proxy' => [
'Proxy.host' => [
'name' => __('Host'),
'severity' => 'info',
'type' => 'string',
'description' => __('The hostname of an HTTP proxy for outgoing sync requests. Leave empty to not use a proxy.'),
'test' => 'testHostname',
],
'Proxy.port' => [
'name' => __('Port'),
'severity' => 'info',
'type' => 'integer',
'description' => __('The TCP port for the HTTP proxy.'),
'test' => 'testForRangeXY',
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Table/UserSettingsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function saveBookmark($user, $data)
'name' => $data['bookmark_name'],
'url' => $data['bookmark_url'],
];
$restricted_domains = Configure::read('Security.restrictions.allowed_bookmark_domains');
$restricted_domains = Configure::read('security.restrictions.allowed_bookmark_domains');
if (!empty($restricted_domains)) {
$restricted_domains = explode(',', $restricted_domains);
$parsed = parse_url($bookmarkData['url']);
Expand Down

0 comments on commit 39e9fb4

Please sign in to comment.