Log in

View Full Version : Admin 'Announcements' permission


Sunsi
07-22-2011, 08:12 AM
I want to give an admin only access so he can edit users but I don't want him to see any hidden forums.
What I do is, I go to

AdminCP > Usergroups > Administrator Permissions

and set 'Can Administer User Permissions' on 'yes'. Just that one, no others.

And by 'Quick User Links' in his profile I set 'Edit Forum Permissions' so that he can't see the forum I don't want him to see.

Than I log out, log in under his username, go to the admin panel and see that he still has access to 'Announcements'. When I click on it, I see that he can make announcements, for all forums, also those that he doesn't have access to. So he can see them and therefor knows they are there.

But I don't want him to know those forums are there.

So I want that he doesn't have access to 'Announcements' and/or can't see the hidden forums. But how do I do that?

kh99
07-23-2011, 04:52 PM
Do you want him to be able to manage announcements? If not, then maybe the easiest thing to do is to add some code near the top of admincp/annoucement to check for his user group or userid and print no permission, like:

if (is_member_of($vbulletin->userinfo, X))
print_cp_no_permission();
or

if ($vbulletin->userinfo['userid'] == X)
print_cp_no_permission();


If you want him to be able to do annoucements for he other forums it's a little more difficult because you'd have to check forum permissions elsewhere in the file.

Sunsi
07-26-2011, 08:31 AM
Thanks! But how do I put in code?

kh99
07-26-2011, 11:06 AM
Oh right, should have mentioned that. You would have to edit the php file, in this case admincp/announcement.php. You can see there's already another permission check right under the comment that says "LOG ACTION", so you could put it before or after that code.