Jump to content

Permission Check for ModCpMemberManagement Extension Tabs


Fosters

Recommended Posts

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.

Link to comment
Share on other sites

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;

 

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...