Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2017-10-25 13:25:43

jeroenvg
Member
From: netherlands
Registered: 2010-04-21
Posts: 34

[workaround] extensions menu missing for copy editors

my plugin has an admin GUI that copy editors (privs=3) should be able to use, apart from the default administrator, publisher (privs=1), and managing editor (privs=2) roles.

i thought i could manage that like this:

…
$plugin['type'] = 5;
…
if (txpinterface === 'admin') {
    add_privs('jvg_booking', '1,2,3');
    register_tab('extensions', 'jvg_booking', ucfirst(gTxt('bookings')));
    register_callback('jvg_booking_gui', 'jvg_booking');
    …
}
…

logged on as a copy editor, i can enter my event name in the address bar to load my administration panel and use it, so i think the added privileges are working.

but i don’t see the Extensions menu.

shouldn’t add_privs() add it automatically for this role?

(txp 4.6.2)

Last edited by jeroenvg (2017-10-31 16:53:16)

Offline

#2 2017-10-28 14:21:46

jeroenvg
Member
From: netherlands
Registered: 2010-04-21
Posts: 34

Re: [workaround] extensions menu missing for copy editors

i found the $txp_permissions array1:

/**
 * Sets permissions.
 *
 * @global array $txp_permissions
 */

$txp_permissions = array(
...
    'tab.extensions'              => '1,2',
    'tab.presentation'            => '1,2,3,    6',
    'tag'                         => '1,2,3,4,5,6',
);

does this mean copy editors (privs=3) will never see the Extensions menu?

1 admin_config.php -> line 190

Offline

#3 2017-10-28 16:44:44

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: [workaround] extensions menu missing for copy editors

jeroenvg wrote #307558:

does this mean copy editors (privs=3) will never see the Extensions menu?

Yes. So either change those settings there… or make your plugin accessible via another menu (one that is visible to copy editors).

Offline

#4 2017-10-31 16:52:09

jeroenvg
Member
From: netherlands
Registered: 2010-04-21
Posts: 34

Re: [workaround] extensions menu missing for copy editors

ruud wrote #307559:

[…] or make your plugin accessible via another menu (one that is visible to copy editors).

thanks! moved it to the Admin menu. it’s as logical a place as Extensions and Copy editors have room there.

Offline

Board footer

Powered by FluxBB