Skip to content

Add main admin access to forum without adding them as moderator #4659

@Jimmi08

Description

@Jimmi08

Motivation

Main admin should have access to full site, but forum editing is limited by forum moderate class.
For example - class 248 Forum moderators
You can set this class to main admin too, but then is the main admin listed as a forum moderator, what is not correct.

Access to the forum (edit, moderate) should be for moderators, forum admin, and main admin.

For main admin just this is needed:

define('MODERATOR', (USER && in_array(USERID, $moderatorUserIds) || getperms('0') ));
in forum_viewforum.php
in forum_viewtopic.php
in forum_post.php

if(!in_array(USERID, $moderatorUserIds) && !getperms('0'))
in forum_class.php

I don't know how to add check if user is forum plugin admin P?) so... at least this should work for main admin.

Thanks

Metadata

Metadata

Assignees

Labels

type: enhancementAn improvement or new feature request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions