SMF Development > Bug Reports

Guests see "Post event" button even if they can't send topics/posts

(1/2) > >>

phantomm:
Well this is more cosmetic 'bug'.

Clean SMF 2.0.2.
Calendar enabled, added permission for guests: Create events in the calendar

Guests see button, but when they try to add event they see: Sorry, you cannot post new topics in this board.

So I think that would be nice to hide it in this situation

K@:
If posting an event creates a post in a topic, the permission to start topics, in that board, has to be given, too, I'd imagine.

phantomm:
yes, and if guests cannot post topics they shouldn't see button

K@:
That'd make sense. :)

emanuele:
The problem is probably avoid yet another query just to hide a button.

For example you can have by default the permission to post new topics disabled for a group, but then you can create a new profile where the same group has permission to create new topics and you assign this profile to a board.
Result: you should be able to post events, but to verify that SMF has to do a query to check it out (in particular it has to use getBoardList to find out if there is any board the user can post into).

So probably the reason behind this "bug" is that do a query just to hide a menu is a bit of a waste.

Navigation

[0] Message Index

[#] Next page

Go to full version