mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
Expose enumeration config though share manager
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
49e7576ae0
commit
8edc824526
2 changed files with 25 additions and 0 deletions
|
|
@ -1764,6 +1764,15 @@ class Manager implements IManager {
|
|||
return $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes';
|
||||
}
|
||||
|
||||
public function allowEnumeration(): bool {
|
||||
return $this->config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes') === 'yes';
|
||||
}
|
||||
|
||||
public function limitEnumerationToGroups(): bool {
|
||||
return $this->allowEnumeration() &&
|
||||
$this->config->getAppValue('core', 'shareapi_restrict_user_enumeration_to_group', 'no') === 'yes';
|
||||
}
|
||||
|
||||
/**
|
||||
* Copied from \OC_Util::isSharingDisabledForUser
|
||||
*
|
||||
|
|
|
|||
|
|
@ -368,6 +368,22 @@ interface IManager {
|
|||
*/
|
||||
public function allowGroupSharing();
|
||||
|
||||
/**
|
||||
* Check if user enumeration is allowed
|
||||
*
|
||||
* @return bool
|
||||
* @since 19.0.0
|
||||
*/
|
||||
public function allowEnumeration(): bool;
|
||||
|
||||
/**
|
||||
* Check if user enumeration is limited to the users groups
|
||||
*
|
||||
* @return bool
|
||||
* @since 19.0.0
|
||||
*/
|
||||
public function limitEnumerationToGroups(): bool;
|
||||
|
||||
/**
|
||||
* Check if sharing is disabled for the given user
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue