Revert "[FEATURE] Add filemount property to backend users"
authorChristian Kuhn <lolli@schwarzbu.ch>
Mon, 29 Apr 2013 13:05:22 +0000 (15:05 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 29 Apr 2013 13:13:31 +0000 (15:13 +0200)
This reverts commit c7313d09d0cb2335d628cb55d73372f2c41447c4

File mounts a graph in CMS core. This is not reflected
by the current implementation. The feature is reverted to not add
a half baked solution.

Change-Id: Ibb2ff41db10f3daa0842e1acf52058489b81045e
Releases: 6.2, 6.1
Related: #39324
Reviewed-on: https://review.typo3.org/20303
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/extbase/Classes/Domain/Model/BackendUser.php
typo3/sysext/extbase/Tests/Unit/Domain/Model/BackendUserTest.php
typo3/sysext/extbase/ext_typoscript_setup.txt

index 25b4e79..c50f668 100644 (file)
@@ -76,32 +76,11 @@ class BackendUser extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
        protected $lastLoginDateAndTime;
 
        /**
-        * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileMount>
-        */
-       protected $fileMounts = NULL;
-
-       /**
         * @var boolean
         */
        protected $ipLockIsDisabled = FALSE;
 
        /**
-        * Constructs this backend user
-        */
-       public function __construct() {
-               $this->fileMounts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-       }
-
-       /**
-        * Initialize object
-        *
-        * @return void
-        */
-       public function initializeObject() {
-               $this->fileMounts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-       }
-
-       /**
         * Gets the user name.
         *
         * @return string the user name, will not be empty
@@ -307,54 +286,6 @@ class BackendUser extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
        public function setLastLoginDateAndTime(\DateTime $dateAndTime = NULL) {
                $this->lastLoginDateAndTime = $dateAndTime;
        }
-
-       /**
-        * Setter for the file mounts
-        *
-        * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $fileMounts
-        * @return void
-        */
-       public function setFileMounts(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $fileMounts) {
-               $this->fileMounts = $fileMounts;
-       }
-
-       /**
-        * Adds a file mount to this backend user
-        *
-        * @param \TYPO3\CMS\Extbase\Domain\Model\FileMount $fileMount
-        * @return void
-        */
-       public function addFileMount(\TYPO3\CMS\Extbase\Domain\Model\FileMount $fileMount) {
-               $this->fileMounts->attach($fileMount);
-       }
-
-       /**
-        * Removes file mount from this backend user
-        *
-        * @param \TYPO3\CMS\Extbase\Domain\Model\FileMount $fileMount
-        * @return void
-        */
-       public function removeFileMount(\TYPO3\CMS\Extbase\Domain\Model\FileMount $fileMount) {
-               $this->fileMounts->detach($fileMount);
-       }
-
-       /**
-        * Remove all file mounts from this backend user
-        *
-        * @return void
-        */
-       public function removeAllFileMounts() {
-               $this->fileMounts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-       }
-
-       /**
-        * Getter of file mounts
-        *
-        * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage
-        */
-       public function getFileMounts() {
-               return $this->fileMounts;
-       }
 }
 
 ?>
\ No newline at end of file
index 5655f73..cb9c080 100644 (file)
@@ -269,62 +269,6 @@ class BackendUserTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
                $this->fixture->setLastLoginDateAndTime($date);
                $this->assertSame($date, $this->fixture->getLastLoginDateAndTime());
        }
-
-       /**
-        * @test
-        */
-       public function getFileMountsInitiallyReturnsEmpty() {
-               $this->assertSame(0, $this->fixture->getFileMounts()->count());
-       }
-
-       /**
-        * @test
-        */
-       public function setFileMountsSetsFileMounts() {
-               $fileMounts = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
-               $this->fixture->setFileMounts($fileMounts);
-
-               $this->assertSame(
-                       $fileMounts,
-                       $this->fixture->getFileMounts()
-               );
-       }
-
-       /**
-        * @test
-        */
-       public function addFileMountAddsFileMount() {
-               $fileMount = new \TYPO3\CMS\Extbase\Domain\Model\FileMount();
-
-               $this->fixture->addFileMount($fileMount);
-               $this->assertTrue($this->fixture->getFileMounts()->contains($fileMount));
-       }
-
-       /**
-        * @test
-        */
-       public function removeFileMountRemovesFileMount() {
-               $fileMount = new \TYPO3\CMS\Extbase\Domain\Model\FileMount();
-
-               $this->fixture->addFileMount($fileMount);
-               $this->fixture->removeFileMount($fileMount);
-               $this->assertFalse($this->fixture->getFileMounts()->contains($fileMount));
-       }
-
-       /**
-        * @test
-        */
-       public function removeAllFileMountsRemovesAllFileMounts() {
-               $fileMount = new \TYPO3\CMS\Extbase\Domain\Model\FileMount();
-               $fileMount2 = new \TYPO3\CMS\Extbase\Domain\Model\FileMount();
-
-               $this->fixture->addFileMount($fileMount);
-               $this->fixture->addFileMount($fileMount2);
-               $this->fixture->removeAllFileMounts();
-
-               $this->assertFalse($this->fixture->getFileMounts()->contains($fileMount));
-               $this->assertFalse($this->fixture->getFileMounts()->contains($fileMount2));
-       }
 }
 
 ?>
\ No newline at end of file
index 88ef842..2363698 100644 (file)
@@ -43,7 +43,6 @@ config.tx_extbase {
                                                endtime.mapOnProperty = endDateAndTime
                                                disableIPlock.mapOnProperty = ipLockIsDisabled
                                                lastlogin.mapOnProperty = lastLoginDateAndTime
-                                               file_mountpoints.mapOnProperty = fileMounts
                                        }
                                }
                        }