How to add permission to editor user on Record Storage Page? - typo3

I am using TYPO3 version 9.5, and I am trying to show (enable) Record Storage Page for editor users inside plugin.
So what I want to do is to show this input for a Used - Editor
TCEMAIN {
permissions.group = show,edit,delete,new,editcontent
permissions.groupid = 1
}
Thanks

The permissions on the fields of tables (like pages, tt_content, etc) are set at usergroup level, so you should edit the backend usergroup of your User Editor (located in the "root" folder) and go to the "Access List" tab.
Here you can set for the editors that belong to that group:
allowed modules
read and write permissions for the tables
allowed page types
allowed fields for every table (fields that are set with exclude=>true in TCA)
allowed content types
allowed languages

Related

Typo3 user rights are inherited incorrectly

I am trying to create user rights in Typo3 7.6 so that a user can simply work as an editor. He has, for his department, a section of the page tree. In that he can almost exclusively create text & media. For a single subpage of this whole tree, it also requires the ability to create an HTML element.
From my personal logic, it would be sufficient to create a user group (A), with all the usual rights would be covered. So creating pages, texts and media. A second user group (B) then only with the explicit permission to create HTML elements. Under Access, I have selected the group in the entire page tree as a simple editor (A), under which one page may be on the HTML, but the second user group (B).
But now it seems that as soon as the user receives the group B, it is not only allowed to create HTML for the one page, but the entire page tree.
What am I doing wrong? How is that otherwise thought?
This doesn't work this way. The permissions of all groups are combined and are the same on any page.
A possible solution could be to use the extension content_defender and a different backend layout for those pages where the HTML element is allowed.
Just as a side note: Allowing an editor the HTML element is a security risk as the editor can also create JavaScript and with that can get admin permissions and other stuff. So I would be very careful with that and would avoid allowing this element for admins.

TYPO3: Custom CE backend permissions

I created several content elements, some of them with the help of the "mask" extension.
The issue is that backend users in the "editor" user group are unable to edit custom content elements.
Where can I edit those permissions ?
Open the configuration of the backend user group.
Open the tab "Access Lists"
Add the tables which are needed for inline elements in "Tables (listing)"-section and "Tables (modify)"-section
Allow the fields needed in this tables and tt_content (Page Content) in the "Allowed excludefields"-Section
Allow the usage of the elements in the "Explicitly allow/deny field values"-section
This should do the job.

Adding additional information to user accounts in Trac

For my Trac plugin, I would like to add a color (as string or rgb values) to each user for use from somewhere else in the plugin. The color should be configurable via the admin page.
Is it possible to add another column to the table in the Users settings of the AccountManagerPlugin panel, and if it is, how do I add the information to the database so I can access it from elsewhere?
Another option would be to make a new Admin Panel for my plugin, which is what I am currently doing, with a table with just the user names and their colors. But in this case, although I already have the empty admin panel, I don't know how to add the table and add new items to the database.
To explain what I need the colors for:
My plugin adds a new export option for tickets, and formats them with my own html and css structure. The tickets contain the owner's name, and this name should be displayed with their respective colors. The code for this already exists, now I just need to retrieve the colors from the database, and beforehand save them to the database via the admin panel.
The colors should be changable only via the admin page.
There's no Users admin panel in Trac, however the AccountManagerPlugin has a User management panel. Let me know if you are using the AccountManagerPlugin and I'll provide more info on that.
Keeping the discussion within the scope of Trac, you could implement the ability for the user to make a selection through a preference panel by implementing IPreferencePanelProvider. You could save the value in the session_attribute table and make use of it anywhere else. For an attribute named user_color, the value can be retrieved using req.session.get('user_color').
Examples can be found in trac.prefs.web_ui. I've linked to the code in Trac 1.1.6 because the module was refactored so that the preferences were more modular #9162.

TYPO3: how to show the field in BE only for its owner?

TCA offers the possibility for conditional displaying fields using displayCond. for an instance HIDE_FOR_NON_ADMINS allows to display field only for admin, but is there a way to display given field only for its creator, determined by cruser_id field?
Not out of the box. You can hook into TCEMAIN (DataHandler) or TCEFORM (FormEngine) to archive this.
You can however use access rights and set the rights to show the page (storage folder) only the the given backend user. Check out the access module.

How to change default settings when adding new users?

I wonder how it is possible to change the default settings for creating new users. At the moment I must remove the “live edit” permission and change the BE language to german for every single user.
I have two groups for my users AUTHOR and MAINAUTHOR. Members of AUTHOR should only have access to the draft workspace and only MAINAUTHOR’s members should have the live workspace too. (MAINAUTHOR inherits from AUTHOR and should add only the live permission.)
I found out that I can use setup.override.lang = de in the group options to change the language but I can’t find an equivalent for the live permission.
You can change the default pageTS for your own user via userTS (or for a whole group).
There you can use TCAdefaults to set default values for your be_users table.
https://docs.typo3.org/m/typo3/reference-tsconfig/11.5/en-us/PageTsconfig/TcaDefaults.html
Example from TYPO3 Core Docs for pages table
# Show newly created pages by default
TCAdefaults.pages.hidden = 0
You could try the extension sys_workflows[1] which was made for these kind of tasks. The extension should work on TYPO3 4.5 but doesn't work on a 6.2beta3 (just tested).
[1] http://forge.typo3.org/projects/extension-sys_workflows
You can configure the default values in the user TSconfig for new users. All options are described in the user TSconfig manual: https://docs.typo3.org/m/typo3/reference-tsconfig/11.5/en-us/UserTsconfig/Setup.html
Also explained is how to configure user TSconfig in general:
https://docs.typo3.org/m/typo3/reference-tsconfig/11.5/en-us/UsingSetting/UserTSconfig.html