SimplePortal

Development => Bugs => Fixed or Bogus Bugs => Topic started by: Manu on October 17, 2008, 05:31:42 PM

Title: Permission settings
Post by: Manu on October 17, 2008, 05:31:42 PM
Hi,

could be I'm blind, but I don't think so.

I gave a member group in our forum the permission to moderate the Portal, but the member
who is in the group can't enter the Admin panel.
I thought when I give this member group the permission to moderate the Portal the member will be able to see the link "Administrator" link in our upper link list.
I tested the member group with my test account and I can't see somewhere a link to enter the Portal Administration.

Do I search at the wrong place?
Title: Re: Permission settings
Post by: Manu on October 19, 2008, 08:43:34 AM
It's very important for us to get a solution for the problem.
Can't help anyone?
Title: Re: Permission settings
Post by: ???1031 on October 20, 2008, 12:49:18 AM
I must look at it, i thought it will be work automatic if the premission is set.

Bye
DIN1031
Title: Re: Permission settings
Post by: Manu on October 20, 2008, 12:03:20 PM
That's what I thought too, but as it seems it doesn't.
I gave the member group the permission to edit the news in the forum,
cause I thought in this way this member group will be able to enter the admin
panel.
I checked it, the link to the admin section is to see in the upper link list, but
when the member has enter the admin section, he/she won't find the link
"SimplePortal Admin" all they can see you can see at the attachment photo.
Title: Re: Permission settings
Post by: Manu on October 28, 2008, 11:02:10 AM
I won't bother, but is there a solution for our problem, cause it's very important
for our forum to get a solution for the problem.  :-[
Title: Re: Permission settings
Post by: ???1031 on October 29, 2008, 07:00:59 AM
sorry i total forgot it <<... lately i forgot to many things...

So i think you select 'Moderate portal' as premission? :)

I think follow this will solve the problem:

Replace in the Subs.php
Code: [Select]
if (allowedTo('moderate_forum'))
$context['admin_areas']['sportal']['areas']['sportal'] = '<a href="' . $scripturl . '?action=spadmin">' . $txt['sp-adminTitle'] . '</a>';

with
Code: [Select]
if (allowedTo('sp_moderate'))
$context['admin_areas']['sportal']['areas']['sportal'] = '<a href="' . $scripturl . '?action=spadmin">' . $txt['sp-adminTitle'] . '</a>';
else
unset($context['admin_areas']['sportal']);

But i'm not sure that the script work ;). It's currently untested.

I forgot there is a possible secure problem in it... because the user can create now php blocks, and i think this should not possible so i think this is not the best way to change this. (I'm not sure.)

Bye
DIN1031
Title: Re: Permission settings
Post by: Manu on October 29, 2008, 09:52:07 AM
sorry i total forgot it <<... lately i forgot to many things...

But i'm not sure that the script work ;). It's currently untested.

I forgot there is a possible secure problem in it... because the user can create now php blocks, and i think this should not possible so i think this is not the best way to change this. (I'm not sure.)

Bye
DIN1031
You aren't alone with forgetting things, I forgot it too, but the member who should get the permission was asking for the solution of our problem. ;)

It works, but not as it should be.
I changed the code you showed, but the link to the admin section in the menu wasn't to see. The link was only to see after I gave the member group the permission to edit the news.

It isn't that big problem when they can create blocks, as long as I still have the option to delete the blocks. ;)
Title: Re: Permission settings
Post by: ???1031 on October 29, 2008, 10:06:42 AM
But with that they can easy gain admin access ;).

But i look deeper into it, because there are some more problems with the premissions oO.

Bye
DIN1031
Title: Re: Permission settings
Post by: asude on November 01, 2008, 08:10:56 AM
that's not a permission problem.

Admin.php

Code: [Select]
isAllowedTo(array('admin_forum', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_boards', 'manage_smileys', 'manage_attachments'));
Code: [Select]
$context['allow_admin'] = allowedTo(array('admin_forum', 'manage_boards', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_attachments', 'manage_smileys'));
add your mod's permissions to the arrays above.

if you don't trust someone, just don't give the permission.
Title: Re: Permission settings
Post by: [SiNaN] on November 10, 2008, 06:48:21 AM
Did the suggestion above solved your problem?

Might be a good idea to move the Bugs board.
Title: Re: Permission settings
Post by: Nathaniel on November 13, 2008, 07:11:10 PM
Moved to the Bugs Board.

We should have a look at the permissions before the next release. ;)
Title: Re: Permission settings
Post by: [SiNaN] on November 26, 2008, 07:27:01 AM
This is fixed.
SimplePortal 2.3.8 © 2008-2024, SimplePortal