Warning: The author of this contribution does not provide support for it anymore.

Contact Board Administration

Contact Board Administration permission issue - Contact Board Administration

Contact Board Administration permission issue

by austin881 » Mon Nov 15, 2010 10:35 pm

The issue is, I cannot remove Moderator permissions from the .MOD tab module.

I'm using Contact Board Administration on a couple of my sites and I'm able to reproduce the issue on both.

Image

I can set this radio button to No and click Apply permissions and it says Success! Then I go back in to the same screen I was at before and the radio button is back to Yes. The submission does not stick.

Is there some good reason why this cannot be changed? Do I have to let Global Moderators have access to this module? I would like only the Administrator to have access.
Available for paid phpBB help! PM me.

My Extensions/MODS: 475 Narius Categorized Smilies for phpBB3, Simplified & Compacted All-Members page, Flash Animated Cumulus Tag Cloud, "Hello" Name Tag of Newest User, AWS S3
phpBB portfolio: chevy truck forum, chevy astro van forum
User avatar
austin881
Registered User
Posts: 284
Joined: Wed Jan 30, 2008 9:58 pm
Location: Boise, Idaho, USA
Name: Austin Maddox
Contact:

Re: Contact Board Administration permission issue

by RMcGirr83 » Tue Nov 16, 2010 12:47 am

I can't reproduce this. So I would have to think there is a misplaced edit or something somewhere.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Contact Board Administration permission issue

by austin881 » Wed Nov 17, 2010 9:42 pm

Rich,
I swear I'm not going crazy. Look at the edits that your mod requires... there are only a few simple ones that can hardly be mistakenly applied.

Steps to Reproduce:
  1. Log in to the ACP.
  2. Click the Permissions tab.
  3. Click Administrators in the left column under GLOBAL PERMISSIONS.
  4. Click Global Moderators in the Manage Groups box on the right side of the screen then click the Edit permissions button.
  5. Click the Advanced permissions text link to open up all options.
  6. Observe that Can manage contact board admin settings is set to Yes.
  7. Set it to No and Apply permissions.
  8. After the Success page, Return back to the same screen.
  9. Observe the Can manage contact board admin settings option is still set to Yes.

No matter what I do I cannot change that. It is stuck on Yes.

I'm afraid this code in the UMIL contact_install.php file does not do what it was intended to do. My global moderators also have access, not just Admins..

Code: Select all

      // Now to add some permission settings
      'permission_add' => array(
         array('a_contact'),
      ),
      
      // How about we give some default permissions then as well?
      // Admins can do anything with the contact mod
      'permission_set' => array(
         // Global Group permissions
         array('ADMINISTRATORS', 'a_contact', 'group'),
         // Global Role permissions for admins
         array('ROLE_ADMIN_FULL', 'a_contact'),
      ),


Have I discovered a bug or is this intentional somehow?
Available for paid phpBB help! PM me.

My Extensions/MODS: 475 Narius Categorized Smilies for phpBB3, Simplified & Compacted All-Members page, Flash Animated Cumulus Tag Cloud, "Hello" Name Tag of Newest User, AWS S3
phpBB portfolio: chevy truck forum, chevy astro van forum
User avatar
austin881
Registered User
Posts: 284
Joined: Wed Jan 30, 2008 9:58 pm
Location: Boise, Idaho, USA
Name: Austin Maddox
Contact:

Re: Contact Board Administration permission issue

by RMcGirr83 » Thu Nov 18, 2010 11:39 am

As I said, I can't reproduce this. When I set the permission to "no" or "yes" or "never" it stays set to what I set it to.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Contact Board Administration permission issue

by austin881 » Thu Nov 18, 2010 2:42 pm

Alright, thanks anyways. I'll keep digging.
Available for paid phpBB help! PM me.

My Extensions/MODS: 475 Narius Categorized Smilies for phpBB3, Simplified & Compacted All-Members page, Flash Animated Cumulus Tag Cloud, "Hello" Name Tag of Newest User, AWS S3
phpBB portfolio: chevy truck forum, chevy astro van forum
User avatar
austin881
Registered User
Posts: 284
Joined: Wed Jan 30, 2008 9:58 pm
Location: Boise, Idaho, USA
Name: Austin Maddox
Contact:

Re: Contact Board Administration permission issue

by 1nkling » Sun Nov 21, 2010 7:31 pm

austin881 wrote:Alright, thanks anyways. I'll keep digging.


Did you have any luck with this? I have the same issue.. :roll:
1nkling
Registered User
Posts: 8
Joined: Sun Nov 21, 2010 7:29 pm
Contact:

Re: Contact Board Administration permission issue

by austin881 » Mon Nov 22, 2010 12:36 am

Rich, I can reproduce this issue all day long.

  • I saw it on a test board on a remote server running 3.0.7PL1
  • I saw it on a test board on a remote server running 3.0.8
  • I saw it on a localhost XAMPP server running 3.0.7-PL1
  • I saw it on a localhost XAMPP server running 3.0.8 installed with automod.
  • I saw it on a localhost XAMPP server running 3.0.8 installed with Quick Install and using automod.

All I'm asking is that you install a fresh copy of phpBB and fresh copy of Contact Board Administration so you can see it for yourself.

It is driving me nuts that I can't figure out why Global Moderators are given a custom Administrative permission by this Mod that cannot be removed. I just know it has something to do with the contact_install.php database script included with this mod.
Available for paid phpBB help! PM me.

My Extensions/MODS: 475 Narius Categorized Smilies for phpBB3, Simplified & Compacted All-Members page, Flash Animated Cumulus Tag Cloud, "Hello" Name Tag of Newest User, AWS S3
phpBB portfolio: chevy truck forum, chevy astro van forum
User avatar
austin881
Registered User
Posts: 284
Joined: Wed Jan 30, 2008 9:58 pm
Location: Boise, Idaho, USA
Name: Austin Maddox
Contact:

Re: Contact Board Administration permission issue

by RMcGirr83 » Mon Nov 22, 2010 2:35 am

Okay so I installed the mod onto a fresh forum and can reproduce it but I don't understand why the installer adds the permission to global mods from the code of the installer.

Code: Select all

      // Admins can do anything with the contact mod
      'permission_set' => array(
         // Global Group permissions
         array('ADMINISTRATORS', 'a_contact', 'group'),
         // Global Role permissions for admins
         array('ROLE_ADMIN_FULL', 'a_contact'),
      ),


I can only assume it has something to do with UMIL itself so here are two ways to fix it.

The first way, go into your database and find the id for the Global Moderators group...write the id down. Next go into the acl_options and find the id for the a_contact permission...write the id down. Finally go into the acl_roles_data and delete the entry that has both the group id for the Global Moderators groups and the id for permission. Purge the cache.

The second way is to run the original installer and choose "uninstall". Then open the install file and find and remove this line

Code: Select all

         // Global Group permissions
         array('ADMINISTRATORS', 'a_contact', 'group'),


then run the installer again and choose to install the mod.

Once one of the above is done you can add and remove the permission at will.

I'll ask around as to why the install file would do that as it clearly doesn't touch the Global Moderators group at all.

Mea culpa but that's the best I can do atm.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Contact Board Administration permission issue

by austin881 » Mon Nov 22, 2010 3:44 am

Thanks Rich! Thank you so much for confirming that I am not suffering from neuro-psychological ACP permission psychosis... or something. The UMIL install file really does add inconsequential permissions to Global Moderators that cannot be removed!

So in light of this new found insight,

Global Moderators = 4
Administrators = 5
==================
a_contact = 160

Therefor, I removed the entity in the phpbb_acl_roles_data which has a role_id of 4 and a auth_option_id of 160 and subsequently purge the cache.

Guess what?! It doesn't work. :( The Global Moderator group is still listed among the Administrators and I cannot set the Can manage contact board admin setting is set to No.

So I took this a step further and removed the entity in the phpbb_acl_roles_data which has a role_id of 5 and a auth_option_id of 160 and subsequently purge the cache.

Guess what?! It works. :P It removed the Global Moderators group and set the Administrators Can manage contact board admin setting to No.

All is well now and I can turn the setting for Administrators OFF and ON as I please.

Thank you so very much for finding a ?fix? for this even though it seems the error is a UMIL permission assignment issue in the database install. I agree we should report this to somebody so let me know if I can help in any way.
Available for paid phpBB help! PM me.

My Extensions/MODS: 475 Narius Categorized Smilies for phpBB3, Simplified & Compacted All-Members page, Flash Animated Cumulus Tag Cloud, "Hello" Name Tag of Newest User, AWS S3
phpBB portfolio: chevy truck forum, chevy astro van forum
User avatar
austin881
Registered User
Posts: 284
Joined: Wed Jan 30, 2008 9:58 pm
Location: Boise, Idaho, USA
Name: Austin Maddox
Contact:

Re: Contact Board Administration permission issue

by oxpus » Mon Nov 22, 2010 8:14 pm

Hi,

the Contact Board Administration MOD uses UMIL 1.0.1-pl1, but the current release of UMIL is 1.0.3.
I think the error is still fixed?!?
User avatar
oxpus
Registered User
Posts: 19
Joined: Mon Feb 03, 2003 11:43 am
Location: D - Bad Wildungen
Name: Karsten Ude
Contact:

Re: Contact Board Administration permission issue

by RMcGirr83 » Mon Nov 22, 2010 8:28 pm

That very well may have been an issue with the older UMIL...I haven't tested it with the latest UMIL version.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Contact Board Administration permission issue

by austin881 » Mon Nov 22, 2010 8:34 pm

A huge warning is thrown if you aren't using the latest UMIL. In all tests I used the latest UMIL (which I believe is currently 1.0.3).
Available for paid phpBB help! PM me.

My Extensions/MODS: 475 Narius Categorized Smilies for phpBB3, Simplified & Compacted All-Members page, Flash Animated Cumulus Tag Cloud, "Hello" Name Tag of Newest User, AWS S3
phpBB portfolio: chevy truck forum, chevy astro van forum
User avatar
austin881
Registered User
Posts: 284
Joined: Wed Jan 30, 2008 9:58 pm
Location: Boise, Idaho, USA
Name: Austin Maddox
Contact:

Re: Contact Board Administration permission issue

by oxpus » Tue Nov 23, 2010 6:48 am

A huge warning is thrown if you aren't using the latest UMIL.

No question.
In all tests I used the latest UMIL (which I believe is currently 1.0.3).

In this case, too? I mean for installing the Contact Board Administration?
I've testet my MODs with UMIL 1.0.3 on a fresh installed phpB 3.0.8 and can't reproduce this error.
But on my development forum, there I've used UMIL since a very early release (permantentely updated), the error exists and I've needed to fix it.
User avatar
oxpus
Registered User
Posts: 19
Joined: Mon Feb 03, 2003 11:43 am
Location: D - Bad Wildungen
Name: Karsten Ude
Contact:

Re: Contact Board Administration permission issue

by RMcGirr83 » Tue Nov 23, 2010 11:02 am

Yes, it happens with UMIL 1.0.3 as well as I just tested it. You can see what UMIL is doing starting at line 1877 of umil/umil.php.

It is assigning the permission to the two roles Admins have in a default install of phpBB (ROLE_ADMIN_STANDARD and ROLE_USER_FULL). It is the ROLE_USER_FULL that is causing the problem.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Contact Board Administration permission issue

by oxpus » Tue Nov 23, 2010 12:54 pm

Hm, maybe I was able on some boards to change the permission settings because no global moderator permissions are setted before I installed a MOD...

But thanks for the hint about the malfunction UMIL.
Now I can help all my users with similar permission problems.
User avatar
oxpus
Registered User
Posts: 19
Joined: Mon Feb 03, 2003 11:43 am
Location: D - Bad Wildungen
Name: Karsten Ude
Contact: