diff options
author | Morris Jobke <hey@morrisjobke.de> | 2021-05-21 15:35:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 15:35:39 +0200 |
commit | f1dbabd9109c08e62d6f82124c63201c96ad2203 (patch) | |
tree | ea6b862c1fa97ec5ad03895c120268bd25d1d35e /apps/files/lib | |
parent | b1ad3faf14140e3c85a7eec1dade88cd551cc747 (diff) | |
parent | 8d7fae8fae054eaa08635fea3ba092196c6f8b84 (diff) | |
download | nextcloud-server-f1dbabd9109c08e62d6f82124c63201c96ad2203.tar.gz nextcloud-server-f1dbabd9109c08e62d6f82124c63201c96ad2203.zip |
Merge pull request #26727 from nextcloud/group-exclude-link-share
Add option to exclude groups from creating link shares
Diffstat (limited to 'apps/files/lib')
-rw-r--r-- | apps/files/lib/Controller/ViewController.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index efaf2dc602f..b055f9a38b5 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -55,6 +55,7 @@ use OCP\IL10N; use OCP\IRequest; use OCP\IURLGenerator; use OCP\IUserSession; +use OCP\Share\IManager; /** * Class ViewController @@ -86,6 +87,8 @@ class ViewController extends Controller { private $initialState; /** @var ITemplateManager */ private $templateManager; + /** @var IManager */ + private $shareManager; public function __construct(string $appName, IRequest $request, @@ -98,7 +101,8 @@ class ViewController extends Controller { IRootFolder $rootFolder, Helper $activityHelper, IInitialState $initialState, - ITemplateManager $templateManager + ITemplateManager $templateManager, + IManager $shareManager ) { parent::__construct($appName, $request); $this->appName = $appName; @@ -113,6 +117,7 @@ class ViewController extends Controller { $this->activityHelper = $activityHelper; $this->initialState = $initialState; $this->templateManager = $templateManager; + $this->shareManager = $shareManager; } /** @@ -302,7 +307,7 @@ class ViewController extends Controller { $params['owner'] = $storageInfo['owner'] ?? ''; $params['ownerDisplayName'] = $storageInfo['ownerDisplayName'] ?? ''; $params['isPublic'] = false; - $params['allowShareWithLink'] = $this->config->getAppValue('core', 'shareapi_allow_links', 'yes'); + $params['allowShareWithLink'] = $this->shareManager->shareApiAllowLinks() ? 'yes' : 'no'; $params['defaultFileSorting'] = $this->config->getUserValue($user, 'files', 'file_sorting', 'name'); $params['defaultFileSortingDirection'] = $this->config->getUserValue($user, 'files', 'file_sorting_direction', 'asc'); $params['showgridview'] = $this->config->getUserValue($user, 'files', 'show_grid', false); |