Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-26-2008, 06:51 PM
Frank H. Shaw Frank H. Shaw is offline
 
Join Date: Aug 2007
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Calendar.php and permisions

I have been trying to stop users when looking at a calendar to not see the events in the calendar if he does not have permisions - but to my surprise the permisions part does not seem to be working for me. I have version vBulletin® Version 3.6.8 and I go into the admin part and for the calendar - i set the custom permisions to the following:

Edit Calendar Permissions For Usergroup: York Rite Member in Calendar Capitular District - 2 - Reguler Meeting

Can View Calendar Yes

Everything else is No

What I want is only the user that have York Rite Member set in the

Additional Usergroups under Usergroup Options in the admin Control Panel which has the York Rite Member but in my test case to test to see if this feature is working - I have only the Blue Lodge Member set - so this user should not be able to view the events in the calendar but he can.

Can any one give me some insite on what is it that i might be doing wrong. If there is a bug - how can I create a modification so that it will work the way i need it too.

THANKS

Frank H. Shaw
Reply With Quote
  #2  
Old 12-26-2008, 07:58 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check the permissions under Calendars > Calendar Permissions
Reply With Quote
  #3  
Old 12-26-2008, 08:13 PM
Frank H. Shaw Frank H. Shaw is offline
 
Join Date: Aug 2007
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The Permisions are set to this as explianed before:

Can View Calendar Yes

All other options set to No

But this is only

Edit Calendar Permissions For Usergroup: York Rite Member in Calendar Capitular District - 2 - Reguler Meeting

I tested this by having a user with the York Rite Member not set and the user could still see the events in the calendar Capitular District - 2 - Reguler Meeting

So there is a problem in the permisions system for calendars.

THANKS

Frank H. Shaw
Reply With Quote
  #4  
Old 12-26-2008, 08:17 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you don't want them to see the calendar (which includes seeing the events), you need to put Can View Calendar to No.

You need to check permissions in both Usergroup Manager > usergroup > Calendar Permissions and in Calendars > Calendar Permissions >
Reply With Quote
  #5  
Old 12-26-2008, 08:41 PM
Frank H. Shaw Frank H. Shaw is offline
 
Join Date: Aug 2007
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edit Calendar Permissions For Usergroup: Blue Lodge Member in Calendar Capitular District - 2 - Reguler Meeting

I set the Can View Calendar No

All other options set to No

But

Edit Calendar Permissions For Usergroup: York Rite Member in Calendar Capitular District - 2 - Reguler Meeting

I set the Can View Calendar Yes

All other options set to No

So what should happen is a user that has Blue Lodge Member set but does not have the York Rite Member set in the Admin Control Panel the point is the User should never be able to see {View the calendar or events in the Calendar - it would be ok to view the calendar and have no events showing - but the calendar shows all the events in the Calendar Capitular District - 2 - Reguler Meeting.

So my test case is failing.

What do I need to check ?

THANKS

Frank H. Shaw
Reply With Quote
  #6  
Old 12-26-2008, 09:00 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When you talk about the permissions being set, I can't tell if you are talking about them being set under Usergroup Manager or under Calendar Permissions - I think you are talking about under Calendar > Calendar Permissions, but the category under Usergroups is also called Calendar Permissions so it's hard to tell which one you are talking about.

Are both of your usergroups Primary Usergroups for your users? So they are either in one or the other but there is no way for them to be in both?
Reply With Quote
  #7  
Old 12-26-2008, 09:38 PM
Frank H. Shaw Frank H. Shaw is offline
 
Join Date: Aug 2007
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edit Calendar Permissions For Usergroup: York Rite Member in Calendar Capitular District - 2 - Reguler Meeting

I set the Can View Calendar Yes

All other options set to No



Can View Calendar Yes

Is set in the following link:

http://www.yoursite.org/forums/admincp/index.php

Calendar Permissions Manager

Edit Calendar Permissions For Usergroup: Blue Lodge Member in Calendar Capitular District - 2 - Reguler Meeting

I set the Can View Calendar No

All other options set to No

But if the user is set in the Admin control panel

is only set for Blue Lodge Member but not York Rite Member. So the only one that should have access to the calendar to View is the User that has York Rite Member set.

This works just as it should in the FORUM part but does not seem to work the same in the calendar. WHY?

THANKS

Frank H. Shaw
Reply With Quote
  #8  
Old 12-26-2008, 09:53 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That link is the index page for the admin cp. Both the permissions areas I am talking about are in the admin cp. What I am saying is the two areas are in admincalendar.php and usergroup.php and it's not clear which you are talking about.

Basically, the ones in admincalendar.php will override the ones in usergroup.php, so you need to make sure they are done in there. Also, are these primary or secondary usergroups?
Reply With Quote
  #9  
Old 12-26-2008, 10:20 PM
Frank H. Shaw Frank H. Shaw is offline
 
Join Date: Aug 2007
Posts: 90
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1. Additional Usergroups not Display usergroups not secondary usergroups??

Primary Usergroup is Registered Users

Display usergroups is Registered Users

Every member is a Blue Lodge Member but only some users are York Rite Member but the settings are only set in the secondary usergroups?

The main category in the Additional Usergroups is


Additional Usergroups this is where the :

York Rite Member

and

Blue Lodge Member

is set or unset

In the above case my test user has

Blue Lodge Member set

York Rite Member not set { because he is not a York Rite Member}



all works just fine for the forums but not in the calendar section.

The Calendar Permisons is where the

Calendar Permissions Manager

Edit Calendar Permissions For Usergroup: Blue Lodge Member in Calendar Capitular District - 2 - Reguler Meeting

I set the Can View Calendar No

All other options set to No

Edit Calendar Permissions For Usergroup: York Rite Member in Calendar Capitular District - 2 - Reguler Meeting

I set the Can View Calendar Yes

All other options set to No


THANKS

Frank H. Shaw

--------------- Added 26 Dec 2008 at 17:06 ---------------

The file calendar.php has three places that I would link to call your attension to:

the lines 485, 755, 795 have the similer script whichis the following:

eval('print_output("' . fetch_template('CALENDAR') . '");');


the part of code are the following:

Monthly View

Weekly View

Year View

I would like to only look at the montly View whichis the following:





Lynne edited out calendar.php code.....


Now here is the thing if I could test the permision on the user in the

York Rite Member

under the Additional Usergroups and if set allow this to happen the events in the calendar be displayed else if not set the calendar would come up with no events listed for that month. The calendar Calendar Capitular District - 2 - Reguler Meeting only has in the whole calendar York Rite Events.

So my question where is the part of the script that handles the output of the events that get showed up in the calendar when the calendar.php does the following:


eval('print_output("' . fetch_template('CALENDAR') . '");');


I hope this better explains what i am trying to do and why!

THANKS

Frank H. Shaw
Reply With Quote
  #10  
Old 12-26-2008, 11:33 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Permissions work such that a Yes always trumps a No. So, if their primary usergroup is Registered Usergroup and that usergroup has Can View Calendar set to Yes, then it will be Yes no matter what the secondary usergroups say. So, you need to set it to No for all Registered users and then set it to Yes only for those you want to allow to view the calendar.

I removed all the default vbulletin code you posted - please see our General Site Rules:
Quote:
Any copyrighted code snippets should be no more than 10 lines in length, unless approved by a member of Staff.


I really don't know much about changing the calendar.php page since I have never paid much attention to the calendar before (except to finally turn it on on my site a few months ago).
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:18 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.04463 seconds
  • Memory Usage 2,257KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete