Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Fosters Posted March 26, 2016 Posted March 26, 2016 The ModCp Extensions getTab method allows us to return 'null' if the tab shouldn't be shown. The ModCpMembers Extensions don't allow us this. Please implement the ModCpMembers usage the same way, so that we can perform a permission check before we return the tab.
Tom Irons Posted March 26, 2016 Posted March 26, 2016 What files are you looking in? All of the ones inside the ModCp and ModCpMemberManagement all have the getTab method. If you want to check permissions yourself you can hook into the extensions and overload the getTab method.
Fosters Posted March 26, 2016 Author Posted March 26, 2016 I have created my own ModCpMemberManagement extension in my application. The getTab method requires you to return a key, unlike the ModCp Extension, which allows getTab to return a key or NULL. If it returns null, the tab won't be shown, which would be useful for the ModCpMemberManagement::getTab method ModCp: if( method_exists( $extension, 'getTab' ) ) { $tab = $extension->getTab(); if ( $tab ) { $tabs[ $tab ][] = $key; } } ModCpMemberManagement $tabs[ $extension->getTab() ][] = $key;
Recommended Posts
Archived
This topic is now archived and is closed to further replies.