aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2023-04-18 10:43:03 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2023-04-18 10:43:03 +0000
commit027c1441a268987c8377b9cfe5869c49cff48e66 (patch)
treede5146459b5cf3b5503bc560a30b28db8c862465 /lib
parent278cbde947d610227bd364d7c279fcc28ac91966 (diff)
hide password change navigation when password is not changable, fixes #2552
Closes #2552 Merge request studip/studip!1725
Diffstat (limited to 'lib')
-rw-r--r--lib/navigation/ProfileNavigation.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/navigation/ProfileNavigation.php b/lib/navigation/ProfileNavigation.php
index 65faca9..ffff06c 100644
--- a/lib/navigation/ProfileNavigation.php
+++ b/lib/navigation/ProfileNavigation.php
@@ -62,8 +62,16 @@ class ProfileNavigation extends Navigation
// profile data
$navigation = new Navigation(_('Persönliche Angaben'));
$navigation->addSubNavigation('profile', new Navigation(_('Grunddaten'), 'dispatch.php/settings/account'));
- if (($perm->get_profile_perm($current_user->user_id) == 'user'
- || ($perm->have_perm('root') && Config::get()->ALLOW_ADMIN_USERACCESS))) {
+ if (
+ !StudipAuthAbstract::CheckField('auth_user_md5.password', $current_user->auth_plugin)
+ && (
+ $perm->get_profile_perm($current_user->user_id) === 'user'
+ || (
+ $perm->have_perm('root')
+ && Config::get()->ALLOW_ADMIN_USERACCESS
+ )
+ )
+ ) {
$navigation->addSubNavigation('password', new Navigation(
_('Passwort ändern'),
'dispatch.php/settings/password'