Yes, thats correct. Also see the testing extension for helps:VSE+ wrote:OK, so I'm trying out this (now that it has been merged) in an extension.
I got it working, but I want to make sure I'm doing it right.
It claims we use the core.permissions event for the logic.
Is this example the correctly intended way of doing the logic?And of course, I have a typical lang file named permissions_foobar.php with this:Code: Select all
static public function getSubscribedEvents() { return array( 'core.permissions' => 'foo_bar_permissions', ); } public function foo_bar_permissions($event) { $event['permissions'] = array_merge($event['permissions'], array( 'u_foobar' => array( 'lang' => 'ACL_U_FOOBAR', 'cat' => 'misc', ), )); }
Code: Select all
$lang = array_merge($lang, array( 'ACL_U_FOOBAR' => 'Can view foo bar topics', ));
https://github.com/phpbb/phpbb3/blob/de ... ns_foo.php
and https://github.com/phpbb/phpbb3/blob/de ... stener.php