You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really needed this functionality so i performed this hack in my config.php:
$user = !empty($_COOKIE['nc_username']) ? $_COOKIE['nc_username'] : '';
if (empty($user) && !empty($_SERVER['PHP_AUTH_USER']) ) {
$user = $_SERVER['PHP_AUTH_USER'];
}
else if (empty($user) && !empty($_SERVER['REQUEST_URI']) && preg_match('/\/(dav\/files|users?)\/([^\/]+)/',$_SERVER['REQUEST_URI'],$matches) ) {
$user = $matches[2];
}
else if (empty($user) && strpos($_SERVER['PHP_SELF'],'/cron.php') > 0 ) {
$user = '> CRON call <';
}
if ( !empty($user) && $user != '> CRON call <'
############### exclude your users here that do get access #
&& ($user != 'admin_user' && $user != 'another_admin_user')
############################################################
&& strpos($_SERVER['PHP_SELF'],'/mail/') > 0 # or put 'mail/setup' here if you want to disable the ability to create/add a mail account
) {
die('you have no access to this part of the site');
}
Disable autoconfig and manual login screen should be the best option.
But it also requires error messages (not allowed) and domain settings management.
Feature Request
From https://help.nextcloud.com/t/disable-setting-add-new-mail-account/106160
Users can add their own accounts. It should be possible to disable this function globally.
Summary
Adding external accounts could break data protecion rules.
The text was updated successfully, but these errors were encountered: