[FEATURE] Add description-field for backend-users 79/40379/4
authorFelix Kopp <felix-source@phorax.com>
Wed, 17 Jun 2015 17:56:43 +0000 (19:56 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 29 Jun 2015 22:02:47 +0000 (00:02 +0200)
With the new field it is possible to give a short description
about a user.

Change-Id: I5ffbc0112d1f12099ccd544ceda600367ce51611
Resolves: #67578
Releases: master
Reviewed-on: http://review.typo3.org/40379
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/beuser/Classes/Domain/Model/BackendUserGroup.php
typo3/sysext/core/Configuration/TCA/be_groups.php
typo3/sysext/core/Configuration/TCA/be_users.php
typo3/sysext/core/Documentation/Changelog/master/Feature-67578-AddDescriptionFieldForBeUsers.rst [new file with mode: 0644]
typo3/sysext/core/ext_tables.sql
typo3/sysext/extbase/Classes/Domain/Model/BackendUser.php

index f2e3a78..47a3306 100644 (file)
@@ -38,6 +38,11 @@ class BackendUserGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
        protected $subGroups;
 
        /**
+        * @var string
+        */
+       protected $description;
+
+       /**
         * @param string $title
         */
        public function setTitle($title) {
@@ -52,6 +57,20 @@ class BackendUserGroup extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
        }
 
        /**
+        * @return string
+        */
+       public function getDescription() {
+               return $this->description;
+       }
+
+       /**
+        * @param string $description
+        */
+       public function setDescription($description) {
+               $this->description = $description;
+       }
+
+       /**
         * @param bool $hidden
         */
        public function setHidden($hidden) {
index 92e1e7f..f39e2d0 100644 (file)
@@ -249,7 +249,8 @@ return array(
                        'config' => array(
                                'type' => 'text',
                                'rows' => 5,
-                               'cols' => 30
+                               'cols' => 30,
+                               'max' => '2000',
                        )
                ),
                'TSconfig' => array(
index 2d75939..a2fa03c 100644 (file)
@@ -31,7 +31,7 @@ return array(
                'searchFields' => 'username,email,realName'
        ),
        'interface' => array(
-               'showRecordFieldList' => 'username,usergroup,db_mountpoints,file_mountpoints,admin,options,file_permissions,userMods,lockToDomain,realName,email,disable,starttime,endtime,lastlogin'
+               'showRecordFieldList' => 'username,description,usergroup,db_mountpoints,file_mountpoints,admin,options,file_permissions,userMods,lockToDomain,realName,email,disable,starttime,endtime,lastlogin'
        ),
        'columns' => array(
                'username' => array(
@@ -43,6 +43,15 @@ return array(
                                'eval' => 'nospace,trim,lower,unique,required'
                        )
                ),
+               'description' => array(
+                       'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.description',
+                       'config' => array(
+                               'type' => 'text',
+                               'rows' => 5,
+                               'cols' => 30,
+                               'max' => '2000',
+                       )
+               ),
                'password' => array(
                        'label' => 'LLL:EXT:lang/locallang_tca.xlf:be_users.password',
                        'config' => array(
@@ -367,13 +376,13 @@ return array(
                )
        ),
        'types' => array(
-               '0' => array('showitem' => 'disable, username, password, usergroup, admin, realName, email, lang, lastlogin,
+               '0' => array('showitem' => 'disable, username, password, description, usergroup, admin, realName, email, lang, lastlogin,
                        --div--;LLL:EXT:lang/locallang_tca.xlf:be_users.tabs.rights, userMods, allowed_languages,
                        --div--;LLL:EXT:lang/locallang_tca.xlf:be_users.tabs.mounts_and_workspaces, workspace_perms, db_mountpoints, options, file_mountpoints, file_permissions, category_perms,
                        --div--;LLL:EXT:lang/locallang_tca.xlf:be_users.tabs.options, lockToDomain, disableIPlock, TSconfig,
                        --div--;LLL:EXT:lang/locallang_tca.xlf:be_users.tabs.access, starttime,endtime,
                        --div--;LLL:EXT:lang/locallang_tca.xlf:be_users.tabs.extended'),
-               '1' => array('showitem' => 'disable, username, password, usergroup, admin, realName, email, lang, lastlogin,
+               '1' => array('showitem' => 'disable, username, password, description, usergroup, admin, realName, email, lang, lastlogin,
                        --div--;LLL:EXT:lang/locallang_tca.xlf:be_users.tabs.options, disableIPlock, TSconfig, db_mountpoints, options, file_mountpoints,
                        --div--;LLL:EXT:lang/locallang_tca.xlf:be_users.tabs.access, starttime,endtime,
                        --div--;LLL:EXT:lang/locallang_tca.xlf:be_users.tabs.extended')
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-67578-AddDescriptionFieldForBeUsers.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-67578-AddDescriptionFieldForBeUsers.rst
new file mode 100644 (file)
index 0000000..83b41f1
--- /dev/null
@@ -0,0 +1,16 @@
+=========================================================
+Feature: #67578 - Add description-field for backend-users
+=========================================================
+
+Description
+===========
+
+A new field "description" has been added to the table be_users.
+With the new field it is possible to give a short description
+about a user, like there is already for be_groups.
+
+
+Impact
+======
+
+The new field is optional and can be used in all projects.
\ No newline at end of file
index afaf12b..368b79d 100644 (file)
@@ -20,7 +20,7 @@ CREATE TABLE be_groups (
        file_mountpoints text,
        file_permissions text,
        hidden tinyint(1) unsigned DEFAULT '0' NOT NULL,
-       description text,
+       description varchar(2000) DEFAULT '' NOT NULL,
        lockToDomain varchar(50) DEFAULT '' NOT NULL,
        deleted tinyint(1) unsigned DEFAULT '0' NOT NULL,
        TSconfig text,
@@ -56,6 +56,7 @@ CREATE TABLE be_users (
        pid int(11) unsigned DEFAULT '0' NOT NULL,
        tstamp int(11) unsigned DEFAULT '0' NOT NULL,
        username varchar(50) DEFAULT '' NOT NULL,
+       description varchar(2000) DEFAULT '' NOT NULL,
        password varchar(100) DEFAULT '' NOT NULL,
        admin tinyint(4) unsigned DEFAULT '0' NOT NULL,
        usergroup varchar(255) DEFAULT '' NOT NULL,
index 52aadda..c3deb8b 100644 (file)
@@ -28,6 +28,11 @@ class BackendUser extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
        protected $userName = '';
 
        /**
+        * @var string
+        */
+       protected $description = '';
+
+       /**
         * @var bool
         */
        protected $isAdministrator = FALSE;
@@ -87,6 +92,20 @@ class BackendUser extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
        }
 
        /**
+        * @return string
+        */
+       public function getDescription() {
+               return $this->description;
+       }
+
+       /**
+        * @param string $description
+        */
+       public function setDescription($description) {
+               $this->description = $description;
+       }
+
+       /**
         * Checks whether this user is an administrator.
         *
         * @return bool whether this user is an administrator