Revision fe65bb3a
Added by Phil Davis over 10 years ago
etc/inc/priv.inc | ||
---|---|---|
292 | 292 |
// obtain ldap groups if we are in ldap mode |
293 | 293 |
if ($authcfg['type'] == "ldap") { |
294 | 294 |
$allowed_groups = @ldap_get_groups($username, $authcfg); |
295 |
} else { |
|
295 |
} |
|
296 |
if (!$allowed_groups) { |
|
296 | 297 |
// search for a local user by name |
297 | 298 |
$local_user = getUserEntry($username); |
298 |
getPrivPages($local_user, $allowed_pages); |
|
299 | 299 |
|
300 |
// obtain local groups if we have a local user |
|
300 |
// obtain local user pages and groups if we have a local user
|
|
301 | 301 |
if ($local_user) { |
302 |
getPrivPages($local_user, $allowed_pages); |
|
302 | 303 |
$allowed_groups = local_user_get_groups($local_user); |
303 | 304 |
} |
304 | 305 |
} |
... | ... | |
331 | 332 |
|
332 | 333 |
return array_merge($fprivs, $sprivs); |
333 | 334 |
} |
334 |
?> |
|
335 |
?> |
Also available in: Unified diff
Fall back to getting local user pages and groups
if the groups could not be found from LDAP and there is a local user.