Feature #16251
closedDisable "versioning"-menuitem via contextMenu.[key].disableItems in User TSconfig
Added by Karl-Ernst Kiel about 18 years ago. Updated almost 6 years ago.
0%
Description
It would be nice to disable the "versioning" contextmenu-Item in a User TSconfig e.g.:
options.contextMenu.pageTree.disableItems = versioning,view,edit,hide,[...]
(see: doc_core_tsconfig 1.2 ->OPTIONS , "versioning" is not (yet?) in the list)
This could be easily done by changing a line in function main in class tx_version_cm1(line 72 in typo3/sysext/version/class.tx_version_cm1.php) from
if (!$TCA[$table] || !$TCA[$table]['ctrl']['versioningWS']) return $menuItems;
to
if (in_array('versioning',$backRef->disabledItems) || !$TCA[$table] || !$TCA[$table]['ctrl']['versioningWS']) return $menuItems;
(issue imported from #M3687)
Files
bug_3687_versioning.diff (626 Bytes) bug_3687_versioning.diff | Administrator Admin, 2006-12-05 22:32 | ||
bug_3687_moreoptions.diff (562 Bytes) bug_3687_moreoptions.diff | Administrator Admin, 2006-12-05 22:39 | ||
patch_3687_3.diff (1.36 KB) patch_3687_3.diff | Administrator Admin, 2008-09-14 21:54 |
Updated by Karl-Ernst Kiel about 18 years ago
To make it complete ("clean up" the whole menu) it would be nice to also have "More Options..." disabled e.g. by
options.contextMenu.pageTree.disableItems = moreoptions,[...]
Modify function main in class tx_extrapagecmoptions (/typo3/sysext/extra_page_cm_options/class.tx_extrapagecmoptions.php, line 86)
change
// Detecting menu level
if (!$backRef->cmLevel) [...]
into
if (!in_array('moreoptions',$backRef->disabledItems) && !$backRef->cmLevel) [...]
Updated by Martin Kutschker about 18 years ago
Or to make it easier, remove the Versioning menu item if the user has no access to the Versioning module.
But of course, a general option to disable page contect menu options (on a per user/grpu basis) are a fine thing.
Updated by Helmut Hummel over 17 years ago
Versioning context menu is displayed even if the user/group has no access to the versioning module.
Added two patches to address versioning and moreoptions removal from context menu
Updated by Karsten Dambekalns over 17 years ago
Changes have been described by Karl-Ernst Kiel. I have provided the diffs and testet it on several sites.
For me this seems to be a nobrainer, so I would be happy if it will be included in 4.0.4
Although the core docs have to be updated, I do not consider this to be a new feature but rather a bugfix.
Sincerely
Helmut Hummel
Updated by Franz Koch over 17 years ago
would have been nice it this one would have made it into 4.1 as it a useabillity-bug to me - and really easy to fix :(
Updated by Franz Koch over 17 years ago
it'll be also nice if the second menu-level of the moreoptions could be disabled, so that hiding/unhiding, pageproperties etc. are still available.
set: options.contentMenu.pageTree.disableItems = moreoptions_extended
and modify function main in class tx_extrapagecmoptions (/typo3/sysext/extra_page_cm_options/class.tx_extrapagecmoptions.php, lines 93 to 99):
---- from ------------------------
$localItems['moreoptions']=$backRef->linkItem(
$GLOBALS['LANG']->makeEntities($LANG->getLLL('label',$LL)),
$backRef->excludeIcon(''),
"top.loadTopMenu('".t3lib_div::linkThisScript()."&cmLevel=1&subname=moreoptions');return false;",
0,
1
);
-------------------------------
---- to------------------------
if(!in_array('moreoptions_extended',$backRef->disabledItems)) {
$localItems['moreoptions']=$backRef->linkItem(
$GLOBALS['LANG']->makeEntities($LANG->getLLL('label',$LL)),
$backRef->excludeIcon(''),
"top.loadTopMenu('".t3lib_div::linkThisScript()."&cmLevel=1&subname=moreoptions');return false;",
0,
1
);
}
-------------------------------
Updated by Typoheads - Web Engineering over 17 years ago
just a reminder...
would be nice 4.1.2
Updated by Graham Solomon about 17 years ago
I'd appreciate it if we could have this in 4.1.2 guys, seems quite simple and if you have users who you don't want to use versioning it's really quite essential.
Updated by Michael Stucki about 17 years ago
Hi Thorsten, I think you can commit this now...
Updated by Jan Greis about 17 years ago
What about the item "send to review/pub"? Shouldn't it also be possible to remove that one?
BTW: sorry if this is a stupid question but i couldn't find out anything about it and if its true that should also be corrected in the core docs, i think the "perms" item listed in the TSConfig has no function?
Updated by Daniel Poetzinger about 17 years ago
thanks for patch.
------------
comments to tx_extrapagecmoptions patch:
1) (it disables all extra click items):
it would be fine if it is possible to only deny the "more options..." items (means only the clickmenu-submenu) - without disabling all other items in the clickmenu.
2) we should also add permission check for the "mount as treeroot" item.
e.g. a
if (!in_array('mounttreeroot',$backRef->disabledItems)) before
$localItems['perms'] = $backRef->DB_tempMountPoint($uid);
Updated by Michael Stucki almost 17 years ago
Thorsten has committed a fix for this now (committed to TYPO3_4-0, TYPO3_4-1, Trunk).
The versioning module is no longer visible if the user has no access to it.
After all, I don't see a reason why this should still be configurable, so I ask if this issue can be closed now?
Updated by Helmut Hummel almost 17 years ago
Hi Michael, good news :)
But:
Not showing the versioning button in clickmenu, when the user hasn't access to it is one thing. To have the possibility to disable the item, like any other item in the clickmenu is something different. And in addition there is the request to have the possibility to disable moreoptions item.
So I don't consider this issue as resolved.
Updated by Michael Stucki almost 17 years ago
Yes, but then it's just a new configuration feature which is not at all related with versioning. So maybe someone should update the bug description or (even better) create a new bug record.
Updated by Michael Stucki almost 17 years ago
Sorry, just changed my mind! ;-) Of course the feature does already exist, I just didn't find it because the term "disableItems" is splitted over two lines in TSconfig.
So forget my last comment, the bug remains open.
Updated by Jeff Segars almost 16 years ago
Patch attached on 14.09.08 was committed to trunk in revision 4113.
Updated by Michael Stucki over 10 years ago
- Category changed from Miscellaneous to Workspaces
Updated by Michael Stucki over 10 years ago
- Project changed from 624 to TYPO3 Core
- Category changed from Workspaces to Workspaces
- Target version deleted (
0)
Updated by Benni Mack almost 6 years ago
- Status changed from Resolved to Closed