0

I wrote a backendmodule with extbase in typo3 4.5 and I would like to show different extbase models for different usergroups, but I don't know how. My idea was to register one backendmodul per usergroup, but i think its too laborious. I don't want to check the user group and their rights in my extension. Is there a way to get this?

Example:

models | usergroup: editor could see

specific models | usergroup: specific_editor could see
Simon Martin
  • 4,203
  • 7
  • 56
  • 93
freshp
  • 525
  • 5
  • 20
  • Could you explain a bit on what your goal is? It might be easier to help then. – pdu Jan 10 '13 at 13:25
  • i will try to show a table with some models, but there are models which should not be seen by specific usergroups. I think there are different ways to get it, like checking the current backenduser and his rights. – freshp Jan 10 '13 at 13:32

4 Answers4

0

Please explain the scenario in details. From this i can say this is possible . All you do see to check the user group and according to this you can create a switchable actions in your controller .

Siva
  • 481
  • 7
  • 26
0

What about having a few checkboxes in extension manager - extension configuration tab for selecting the user group and their rights in your extension?

Sankar V
  • 4,110
  • 5
  • 28
  • 52
  • I also had this idea, but i think there must be a better way. In the userrights you can select your extension-models and the user can not see them in the pagetree, but in the backendmodul they are still be seen. – freshp Jan 11 '13 at 07:49
0

I try to show different extbase-model-entries to different users in my own backend-modul. For example user 'editor' only see 'entry1' and 'special_editor' see 'entry2' and 'entry3'. My idea was to extend the usergroup tca and add a selectfield for my models. My backend-modul will check the current backenduser to get his usergroup and than i want to check the assigned model. It seems to be laborious, but i think its the best and the only way.

freshp
  • 525
  • 5
  • 20
0

I get one solution:

At first i add a field to be_users.

$tempColumns = array(
    'model' => array(
        'exclude' => 0,
        'l10n_mode' => 'mergeIfNotBlank',
        'label' => 'LLL:EXT:extensionResources/Private/Language/locallang_db.xml:tx_extension_domain_model_ownmodel',
        'config' => array(
            'type' => 'select',
            'foreign_table' => 'tx_extension_domain_model_ownmodel',
            'size' => 10,
            'width' => 20,
            'minitems' => 0,
            'maxitems' => 9999,
            'allowNonIdValues' => 0,
            'eval' => 'required',

        ),
    ),
);

t3lib_div::loadTCA('be_users');
t3lib_extMgm::addTCAcolumns('be_users',$tempColumns,1);
t3lib_extMgm::addToAllTCAtypes('be_users','model;;;;1-1-1');

in my backend-modul i check the current backenduser

$GLOBALS['BE_USER']->user['model']

so i get a list of my modelids separated by commas.

thats it.

freshp
  • 525
  • 5
  • 20