vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Admin 'Announcements' permission (https://vborg.vbsupport.ru/showthread.php?t=267225)

Sunsi 07-22-2011 08:12 AM

Admin 'Announcements' permission
 
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:

Code:

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

or

Code:

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.


All times are GMT. The time now is 02:32 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00924 seconds
  • Memory Usage 1,711KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete