Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/dav/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
class ComposerStaticInitDAV
{
public static $prefixLengthsPsr4 = array (
'O' =>
'O' =>
array (
'OCA\\DAV\\' => 8,
),
);

public static $prefixDirsPsr4 = array (
'OCA\\DAV\\' =>
'OCA\\DAV\\' =>
array (
0 => __DIR__ . '/..' . '/../lib',
),
Expand Down
2 changes: 1 addition & 1 deletion apps/files/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace OCA\Files\AppInfo;

use NCU\Sharing\ISharingRegistry;
use OC\Core\Sharing\Permission\EditSharePermissionPreset;
use OC\Core\Sharing\Permission\ViewSharePermissionPreset;
use OC\Core\Sharing\Property\ExpirationDateSharePropertyType;
Expand Down Expand Up @@ -60,7 +61,6 @@
use OCP\Share\Events\ShareCreatedEvent;
use OCP\Share\Events\ShareDeletedEvent;
use OCP\Share\Events\ShareDeletedFromSelfEvent;
use OCP\Sharing\ISharingRegistry;
use OCP\User\Events\UserFirstTimeLoggedInEvent;

class Application extends App implements IBootstrap {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

namespace OCA\Files\Sharing\Permission;

use NCU\Sharing\Permission\ISharePermissionType;
use OCA\Files\AppInfo\Application;
use OCP\Constants;
use OCP\IAppConfig;
use OCP\L10N\IFactory;
use OCP\Sharing\Permission\ISharePermissionType;

final readonly class NodeCreateSharePermissionType implements ISharePermissionType {
public function __construct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

namespace OCA\Files\Sharing\Permission;

use NCU\Sharing\Permission\ISharePermissionType;
use OCA\Files\AppInfo\Application;
use OCP\Constants;
use OCP\IAppConfig;
use OCP\L10N\IFactory;
use OCP\Sharing\Permission\ISharePermissionType;

final readonly class NodeDeleteSharePermissionType implements ISharePermissionType {
public function __construct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

namespace OCA\Files\Sharing\Permission;

use NCU\Sharing\Permission\ISharePermissionType;
use OCA\Files\AppInfo\Application;
use OCP\L10N\IFactory;
use OCP\Share\IManager;
use OCP\Sharing\Permission\ISharePermissionType;

final readonly class NodeDownloadSharePermissionType implements ISharePermissionType {
public function __construct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

namespace OCA\Files\Sharing\Permission;

use NCU\Sharing\Permission\ISharePermissionType;
use OCA\Files\AppInfo\Application;
use OCP\L10N\IFactory;
use OCP\Sharing\Permission\ISharePermissionType;

final class NodeReadSharePermissionType implements ISharePermissionType {
#[\Override]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

namespace OCA\Files\Sharing\Permission;

use NCU\Sharing\Permission\ISharePermissionType;
use OCA\Files\AppInfo\Application;
use OCP\Constants;
use OCP\IAppConfig;
use OCP\L10N\IFactory;
use OCP\Sharing\Permission\ISharePermissionType;

final readonly class NodeUpdateSharePermissionType implements ISharePermissionType {
public function __construct(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

namespace OCA\Files\Sharing\Property;

use NCU\Sharing\Property\ABooleanSharePropertyType;
use NCU\Sharing\Share;
use OCA\Files\AppInfo\Application;
use OCP\L10N\IFactory;
use OCP\Sharing\Property\ABooleanSharePropertyType;
use OCP\Sharing\Share;

final class NodeGridViewSharePropertyType extends ABooleanSharePropertyType {
#[\Override]
Expand Down
10 changes: 5 additions & 5 deletions apps/files/lib/Sharing/Source/NodeShareSourceType.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
namespace OCA\Files\Sharing\Source;

use Exception;
use NCU\Sharing\Icon\ShareIconURL;
use NCU\Sharing\ISharingManager;
use NCU\Sharing\ShareAccessContext;
use NCU\Sharing\Source\IShareSourceType;
use NCU\Sharing\Source\ShareSource;
use OCA\Files\AppInfo\Application;
use OCA\Files_Trashbin\Events\MoveToTrashEvent;
use OCP\EventDispatcher\Event;
Expand All @@ -23,11 +28,6 @@
use OCP\Interaction\Resources\NodeResource;
use OCP\IURLGenerator;
use OCP\L10N\IFactory;
use OCP\Sharing\Icon\ShareIconURL;
use OCP\Sharing\ISharingManager;
use OCP\Sharing\ShareAccessContext;
use OCP\Sharing\Source\IShareSourceType;
use OCP\Sharing\Source\ShareSource;

/**
* @template-implements IEventListener<NodeDeletedEvent|MoveToTrashEvent>
Expand Down
8 changes: 4 additions & 4 deletions apps/files/tests/Sharing/Source/NodeShareSourceTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

declare(strict_types=1);

use NCU\Sharing\ISharingManager;
use NCU\Sharing\ISharingRegistry;
use NCU\Sharing\ShareAccessContext;
use NCU\Sharing\Source\ShareSource;
use OC\Files\Filesystem;
use OC\User\Database;
use OCA\Files\Sharing\Source\NodeShareSourceType;
Expand All @@ -19,10 +23,6 @@
use OCP\IUser;
use OCP\IUserManager;
use OCP\Server;
use OCP\Sharing\ISharingManager;
use OCP\Sharing\ISharingRegistry;
use OCP\Sharing\ShareAccessContext;
use OCP\Sharing\Source\ShareSource;
use PHPUnit\Framework\Attributes\Group;
use Test\TestCase;

Expand Down
2 changes: 1 addition & 1 deletion apps/sharing/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

namespace OCA\Sharing\AppInfo;

use NCU\Sharing\ISharingRegistry;
use OCA\Sharing\Capabilities;
use OCA\Sharing\Middleware\ShareApiEnabledMiddleware;
use OCA\Sharing\SharingBackend;
Expand All @@ -17,7 +18,6 @@
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\Server;
use OCP\Sharing\ISharingRegistry;

final class Application extends App implements IBootstrap {
public const string APP_ID = 'sharing';
Expand Down
6 changes: 3 additions & 3 deletions apps/sharing/lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@

namespace OCA\Sharing;

use NCU\Sharing\ISharingRegistry;
use NCU\Sharing\Permission\ISharePermissionPreset;
use NCU\Sharing\Source\IShareSourceType;
use OCA\Sharing\AppInfo\Application;
use OCP\Capabilities\ICapability;
use OCP\L10N\IFactory;
use OCP\Server;
use OCP\Share\IManager;
use OCP\Sharing\ISharingRegistry;
use OCP\Sharing\Permission\ISharePermissionPreset;
use OCP\Sharing\Source\IShareSourceType;

/**
* @psalm-import-type SharingSourceType from ResponseDefinitions
Expand Down
4 changes: 2 additions & 2 deletions apps/sharing/lib/Command/AddShareRecipient.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

namespace OCA\Sharing\Command;

use OCP\Sharing\Recipient\IShareRecipientType;
use OCP\Sharing\Recipient\ShareRecipient;
use NCU\Sharing\Recipient\IShareRecipientType;
use NCU\Sharing\Recipient\ShareRecipient;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down
4 changes: 2 additions & 2 deletions apps/sharing/lib/Command/AddShareSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

namespace OCA\Sharing\Command;

use OCP\Sharing\Source\IShareSourceType;
use OCP\Sharing\Source\ShareSource;
use NCU\Sharing\Source\IShareSourceType;
use NCU\Sharing\Source\ShareSource;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down
4 changes: 2 additions & 2 deletions apps/sharing/lib/Command/CreateShare.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@

namespace OCA\Sharing\Command;

use NCU\Sharing\Exception\ShareInvalidException;
use NCU\Sharing\ShareAccessContext;
use OCP\IUserManager;
use OCP\L10N\IFactory;
use OCP\Server;
use OCP\Sharing\Exception\ShareInvalidException;
use OCP\Sharing\ShareAccessContext;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down
2 changes: 1 addition & 1 deletion apps/sharing/lib/Command/DeleteShare.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
namespace OCA\Sharing\Command;

use Exception;
use NCU\Sharing\Exception\AShareException;
use OC\Core\Command\Base;
use OCP\Sharing\Exception\AShareException;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
Expand Down
4 changes: 2 additions & 2 deletions apps/sharing/lib/Command/GetShares.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
namespace OCA\Sharing\Command;

use Exception;
use NCU\Sharing\Share;
use NCU\Sharing\Source\IShareSourceType;
use OC\Core\Command\Base;
use OCP\Sharing\Share;
use OCP\Sharing\Source\IShareSourceType;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down
4 changes: 2 additions & 2 deletions apps/sharing/lib/Command/RemoveShareRecipient.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

namespace OCA\Sharing\Command;

use OCP\Sharing\Recipient\IShareRecipientType;
use OCP\Sharing\Recipient\ShareRecipient;
use NCU\Sharing\Recipient\IShareRecipientType;
use NCU\Sharing\Recipient\ShareRecipient;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down
4 changes: 2 additions & 2 deletions apps/sharing/lib/Command/RemoveShareSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

namespace OCA\Sharing\Command;

use OCP\Sharing\Source\IShareSourceType;
use OCP\Sharing\Source\ShareSource;
use NCU\Sharing\Source\IShareSourceType;
use NCU\Sharing\Source\ShareSource;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down
2 changes: 1 addition & 1 deletion apps/sharing/lib/Command/SelectSharePermissionPreset.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace OCA\Sharing\Command;

use OCP\Sharing\Permission\ISharePermissionPreset;
use NCU\Sharing\Permission\ISharePermissionPreset;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down
8 changes: 4 additions & 4 deletions apps/sharing/lib/Command/SharingBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@

use Closure;
use Exception;
use NCU\Sharing\Exception\AShareException;
use NCU\Sharing\ISharingManager;
use NCU\Sharing\ISharingRegistry;
use NCU\Sharing\ShareAccessContext;
use OC\Core\Command\Base;
use OCP\IDBConnection;
use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\L10N\IFactory;
use OCP\Sharing\Exception\AShareException;
use OCP\Sharing\ISharingManager;
use OCP\Sharing\ISharingRegistry;
use OCP\Sharing\ShareAccessContext;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down
4 changes: 2 additions & 2 deletions apps/sharing/lib/Command/UpdateSharePermission.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

namespace OCA\Sharing\Command;

use OCP\Sharing\Permission\ISharePermissionType;
use OCP\Sharing\Permission\SharePermission;
use NCU\Sharing\Permission\ISharePermissionType;
use NCU\Sharing\Permission\SharePermission;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down
4 changes: 2 additions & 2 deletions apps/sharing/lib/Command/UpdateShareProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

namespace OCA\Sharing\Command;

use OCP\Sharing\Property\ISharePropertyType;
use OCP\Sharing\Property\ShareProperty;
use NCU\Sharing\Property\ISharePropertyType;
use NCU\Sharing\Property\ShareProperty;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down
4 changes: 2 additions & 2 deletions apps/sharing/lib/Command/UpdateShareRecipientSecret.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

namespace OCA\Sharing\Command;

use OCP\Sharing\Recipient\IShareRecipientType;
use OCP\Sharing\Recipient\ShareRecipient;
use NCU\Sharing\Recipient\IShareRecipientType;
use NCU\Sharing\Recipient\ShareRecipient;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down
2 changes: 1 addition & 1 deletion apps/sharing/lib/Command/UpdateShareState.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace OCA\Sharing\Command;

use OCP\Sharing\ShareState;
use NCU\Sharing\ShareState;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand Down
36 changes: 18 additions & 18 deletions apps/sharing/lib/Controller/ApiV1Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,24 @@
namespace OCA\Sharing\Controller;

use Exception;
use NCU\Sharing\Exception\ShareInvalidException;
use NCU\Sharing\Exception\ShareNotFoundException;
use NCU\Sharing\Exception\ShareOperationForbiddenException;
use NCU\Sharing\ISharingManager;
use NCU\Sharing\ISharingRegistry;
use NCU\Sharing\Permission\ISharePermissionPreset;
use NCU\Sharing\Permission\ISharePermissionType;
use NCU\Sharing\Permission\SharePermission;
use NCU\Sharing\Property\ISharePropertyType;
use NCU\Sharing\Property\ISharePropertyTypeFilter;
use NCU\Sharing\Property\ShareProperty;
use NCU\Sharing\Recipient\IShareRecipientType;
use NCU\Sharing\Recipient\ShareRecipient;
use NCU\Sharing\Share;
use NCU\Sharing\ShareAccessContext;
use NCU\Sharing\ShareState;
use NCU\Sharing\Source\IShareSourceType;
use NCU\Sharing\Source\ShareSource;
use OCA\Sharing\ResponseDefinitions;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\ApiRoute;
Expand All @@ -23,24 +41,6 @@
use OCP\IUserManager;
use OCP\IUserSession;
use OCP\L10N\IFactory;
use OCP\Sharing\Exception\ShareInvalidException;
use OCP\Sharing\Exception\ShareNotFoundException;
use OCP\Sharing\Exception\ShareOperationForbiddenException;
use OCP\Sharing\ISharingManager;
use OCP\Sharing\ISharingRegistry;
use OCP\Sharing\Permission\ISharePermissionPreset;
use OCP\Sharing\Permission\ISharePermissionType;
use OCP\Sharing\Permission\SharePermission;
use OCP\Sharing\Property\ISharePropertyType;
use OCP\Sharing\Property\ISharePropertyTypeFilter;
use OCP\Sharing\Property\ShareProperty;
use OCP\Sharing\Recipient\IShareRecipientType;
use OCP\Sharing\Recipient\ShareRecipient;
use OCP\Sharing\Share;
use OCP\Sharing\ShareAccessContext;
use OCP\Sharing\ShareState;
use OCP\Sharing\Source\IShareSourceType;
use OCP\Sharing\Source\ShareSource;
use RuntimeException;
use ValueError;

Expand Down
Loading
Loading