add new local permissions

Discussion forum for MOD Writers regarding MOD Development.
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt

add new local permissions

Post by Martin Truckenbrodt »

Hello,
to get the access to new MCP page controlled I want to add new local permissions.
At the ACL_OTPION_TABLE I have added:
n_ - 0 - 1 - 0
n_leader - 0 - 1 - 0
At the ACL_ROLES_TABLE I have added:
ROLE_NEWSLETTER_LEADER - ROLE_NEWSLETTER_LEADER_EXPLAIN - n_ - 1
At the ACL_ROLES_DATA_TABLE I've added two entries with the two options and the same role.
At the ACL_USERS_TABLE I have added a new column called newsletter_id and I have a entry for one user to test the n_leader (moderator) permission. I looks like a forum moderator permission but forum_id = 0 and newsletter_id ist set to the id of the newsletter.

At the the info for the MCP page I have:

Code: Select all

				'send'		=> array('title' => 'MCP_NEWSLETTER_SEND', 'auth' => 'acln_leader || acl_a_newsletter', 'cat' => array('MCP_NEWSLETTER')),
I'm trying to open the following link:

Code: Select all

	'U_MCP'					=> (newsletter_leader_status($user->data['user_id'], $newsletter_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "n=$newsletter_id&i=newsletter&mode=send", true, $user->session_id) : '',
I'm still getting following error:
Module not accessible
The acl_a_newsletter permission is running well.

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt

Re: add new local permissions

Post by Martin Truckenbrodt »

Hello,
bump.

I've done another look to the code. It seems that it is not possible to add new local permissions to phpBB3 for add ons to use them in new MCP pages. A lot of edits at least in includes/auth.php and in includes/acp/auth.php would be needed. Although I think some of the edits are not possible.

So, what's my result:
Adding of new MCP modules for Add Ons using new local permissions is not possible. The functionality have to move to the frontend of the Add On.

Bye Martin
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!
a_n_n_a_m
Registered User
Posts: 47
Joined: Wed Dec 12, 2007 11:30 am

Re: add new local permissions

Post by a_n_n_a_m »

hi.. i have a very similar problem.. when you say you solved the problem in the frontend, what exactly did u do?
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34459
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run

Re: add new local permissions

Post by A_Jelly_Doughnut »

Hi,

Paul posted an auth.php which allows additional local permission types here:
http://www.phpbb.com/community/viewtopi ... 035&hilit=
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
User avatar
Martin Truckenbrodt
Registered User
Posts: 3045
Joined: Sun Mar 23, 2003 6:22 pm
Location: Franconia
Name: Martin Truckenbrodt

Re: add new local permissions

Post by Martin Truckenbrodt »

Hello,
I think it's not MOD authors job to correct this problem. So I will remove the MCP modules from my Multiple Newsletters Add On. But I will use the ACL_xxx_TABLEs as much as possible to be ready for the future of phpBB3.x or phpBB4! :) ;)

For developers and MOD authors:
You can add new local permissions to phpBB3. But the MCP can not work with them. The MCP is not able to add the pages itself by the new local permissions automatically.

Bye Martin

Update: I've done a feature request: http://sourceforge.net/tracker/?func=de ... tid=975058
Free tutorial: Installing MODs in phpBB 3.0
Advanced Block MOD - Prevent spam on your phpBB 3.0 board with Stop Forum Spam, BotScout, Akismet, Project Honey Pot and several IP-RBL and Domain-RBL DNS blacklists!
My MODs
Use the official phpBB Ideas to vote missing core features!!!

Return to “[3.0.x] MOD Writers Discussion”