diff --git a/lib/Db/SharingACLMapper.php b/lib/Db/SharingACLMapper.php index cace3cfa..f019930d 100644 --- a/lib/Db/SharingACLMapper.php +++ b/lib/Db/SharingACLMapper.php @@ -18,21 +18,8 @@ use OCA\Passman\Utility\Utils; class SharingACLMapper extends Mapper { const TABLE_NAME = '*PREFIX*passman_sharing_acl'; - public function __construct(IDBConnection $db, Utils $utils) { + public function __construct(IDBConnection $db) { parent::__construct($db, 'passman_sharing_acl'); - $this->utils = $utils; - } - - /** - * Gets all the credential data for the given user - * @param $userId - * @param $item_guid - * @return SharingACL[] - */ - public function getCredentialPermissions(IUser $userId, $item_guid){ - $sql = "SELECT * FROM ". self::TABLE_NAME ." WHERE user_id = ? AND item_guid = ?"; - - return $this->findEntities($sql, [$userId, $item_guid]); } public function createACLEntry(SharingACL $acl){ diff --git a/tests/unit/lib/Db/SharingACLMapperTest.php b/tests/unit/lib/Db/SharingACLMapperTest.php new file mode 100644 index 00000000..f03d8558 --- /dev/null +++ b/tests/unit/lib/Db/SharingACLMapperTest.php @@ -0,0 +1,13 @@ +