[4058]Access to Mod Centre Permission doesn't apply to group_id=2 (Global Mod)

Started by Acans, August 23, 2009, 05:22:54 AM

Previous topic - Next topic

Arantor

I've posted some more on the bug report for this one, as I'm really not sure the best approach to take here.
Holder of controversial views, all of which my own.


Acans

Quote from: Arantor on December 07, 2009, 07:54:31 AM
I've posted some more on the bug report for this one, as I'm really not sure the best approach to take here.

Mmm, I was taking note on some of the suggestions you where making on the official bug report in the bug tracker, sep I cannot comment as well :(
"The Book of Arantor, 17:3-5
  And I said unto him, thy database query shalt always be sent by the messenger of $smcFunc
  And $smcFunc shall protect you against injections and evil
  And so it came to pass that mysql_query was declared deprecated and even though he says he is not
  dead yet, the time was soon to come to pass when mysql_query shall be gone and no more

Arantor

Quoting the text here for you to reply to:

QuoteRandom question: if access is not granted to the moderation center by the overarching permission, should that simply be it?

For example, a moderator without access but still have access to moderate_board still has access to the center.

I have a patch that will actually take into account the hidden permissions correctly, though it doesn't (currently) take it into account on the Show Permissions page. But it occurs to me that moderate_board does grant access_mod_center implicitly.

While I like what you're suggesting, Norv, I don't think it's something we should change now. For 2.1, perhaps, but definitely not this stage.

As I see it, we have three routes.

1. Make access to mod center dependent ONLY on access_mod_center, meaning the show and isAllowedTo checks on that only.

2. Go with something akin to the (IMHO) hackish patch I have that disables hidden permissions. This would also, however, tidy up something for modders such that they can put all the hideable permissions in a single place.

3. What you've suggested, have permissions implicitly triggering other permissions in a UI-visible way. (Right now, the implicit trigger is still there, but not visible)


I don't have a problem with patching for option 1 - it is 'expected' if not entirely 'desirable' behaviour. 2... well, I already have a patch that does most of the work here and 'seems' to work. 3, I have to argue is something we would at best put back to 2.1.

(Though the patch does the view permissions page too)
Holder of controversial views, all of which my own.


Acans

Do you think you can add this as a comment in my place.

What about breaking up the Moderation Centre like we have with the Administration centre.

In 2.0 RC1.2, the last bug i reported was Group Moderators can see the WHOLE moderation centre, when really all they should see is their group requests. AFAIK this has been fixed.

Example: Why not if the Warnings system is disabled, you do not see the Recent watched members blocks.

What I'm saying is certain permissions activate the blocks instead of one permission activates all.
"The Book of Arantor, 17:3-5
  And I said unto him, thy database query shalt always be sent by the messenger of $smcFunc
  And $smcFunc shall protect you against injections and evil
  And so it came to pass that mysql_query was declared deprecated and even though he says he is not
  dead yet, the time was soon to come to pass when mysql_query shall be gone and no more

Norv

There is no need to add the comment, this topic is already linked into the bug report, thus this topic will most likely be verified as well by the devs when they analyse the situation.

Thank you for the point added!
To-do lists are for deferral. The more things you write down the later they're done... until you have 100s of lists of things you don't do.

File a security report | Developers' Blog | Bug Tracker


Also known as Norv on D* | Norv N. on G+ | Norv on Github

Arantor

Has the patch for this one been reviewed? Are there any issues with the provided patch? (NB, I don't know if it's still the case in RC3... I never retested it since the bug is still open, nor have I retested the patch from 3+ months ago on it)
Holder of controversial views, all of which my own.


[SiNaN]

Former SMF Core Developer | My Mods | SimplePortal

Arantor

I see this is fixed, but I have to say I disagree with the logic of the solution used. I understand why it was done, but here's my $0.02c on it.

The reason I proposed the 'overkill' is because it fixes the root cause: permissions being given for disabled features that have knock-on effects. Simply checking the permissions isn't enough; the permissions are still being granted in this case. You're just doing other checks that overrides that factor. I still think actually disabling them is a cleaner solution, especially if you later extend Core Features with other stuff.

Having the disabling factor as well also gives customisation authors who would extend SMF with entries in Core Features somewhere to hook into.

*shrug* You've fixed the immediately visible bug, can't fault you on your energy and knowledge there, but I think you've fixed the symptom, not the underlying cause.
Holder of controversial views, all of which my own.


Advertisement: