Skip to content

Commit d272577

Browse files
authored
Only redirect for save and user does not have core.manage permission (#42872)
1 parent 0d566f2 commit d272577

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

administrator/components/com_users/src/Controller/UserController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ public function save($key = null, $urlVar = null)
118118
}
119119

120120
// If a user has to renew a password but has no permission for users
121-
if (!$this->app->getIdentity()->authorise('core.admin', 'com_users')) {
122-
$this->setRedirect('index.php');
121+
if ($task === 'save' && !$this->app->getIdentity()->authorise('core.manage', 'com_users')) {
122+
$this->setRedirect(Uri::base());
123123
}
124124

125125
return $result;

0 commit comments

Comments
 (0)