Add user permission in 3.2. / tab not showing

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
cangor
Registered User
Posts: 39
Joined: Thu Oct 28, 2010 1:56 pm

Add user permission in 3.2. / tab not showing

Post by cangor » Mon Nov 20, 2017 3:34 pm

Hello,

I'm trying to add a new user-permission in 3.2. for my extension. I'm doing:

In my migration class:

Code: Select all

public function update_data()
	{
		return array(
			...
			array('permission.add', array('u_myext_mypermission')),	
        );
In my language-file:

Code: Select all

	$lang['permission_cat']['myext'] = 'My Ext';
	
	$lang = array_merge($lang, array(
	...
	'u_myext_mypermission'    => array('lang' => 'My permission', 'cat' => 'myext'),
But the tab or the permission isn't showin up in the acp -> user permissions at all.

Any idea what might be wrong?

User avatar
posey
Registered User
Posts: 546
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs

Re: Add user permission in 3.2. / tab not showing

Post by posey » Mon Nov 20, 2017 4:53 pm

Have a look here: 3.2.x Docs: Permissions tutorial
This is a solid walk through!

And if you want a working example, have a look at phpBB Board Rules:
- Initial permission migration
- Event Listener
- Language file
Ultimate Extensions:
Image Ultimate Blog (coming soon)
Image Ultimate Teams

''I'm pretty sure there's a lot more to life than being really, really, ridiculously good looking. And I plan on finding out what that is.''

cangor
Registered User
Posts: 39
Joined: Thu Oct 28, 2010 1:56 pm

Re: Add user permission in 3.2. / tab not showing

Post by cangor » Tue Nov 21, 2017 1:08 pm

Ah, thanks a lot! I guess I was a bit lost between the docs of 3.1 and 3.2.

Post Reply

Return to “Extension Writers Discussion”

Who is online

Users browsing this forum: No registered users and 8 guests