Modify

Opened 7 years ago

Closed 7 years ago

#2640 closed defect (fixed)

No Screenshots shown in /screenshots whithout SCREENSHOTS_FILTER permission

Reported by: izzy Owned by: Blackhex
Priority: normal Component: ScreenshotsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

In the one of my projects which is already using the ScreenshotsPlugin, I granted SCREENSHOTS_VIEW to anonymous. Being not logged in, I can see the screenshots in the Wiki articles. But going to the plugins page ("/screenshots"), there's only an empty page displayed. Only after I add SCREENSHOTS_FILTER, anonymous visitors have a chance seeing the screenshots - since the default is "nothing selected". Even if I add all components to "default_components", without the "SCREENSHOTS_FILTER" permission there is still nothing displayed. I don't think this is intended - is it?

IMHO, without the SCREENSHOTS_FILTER permission (but the SCREENSHOTS_VIEW permission) granted, a visitor should see screenshots of the components defined in "default_components". And, BTW: How about the keyword "all" in default components? It is very unlikely somebody will use a component like that - but if I add a new component, I may forget about updating the default_components ;)

Attachments (0)

Change History (4)

comment:1 Changed 7 years ago by Blackhex

  • Status changed from new to assigned

Without SCREENSHOTS_FILTER permission user should see screenshots of default_components and default_versions. I'll test if it is so later.

Yes, that's good idea to append all value for default_components and default_versions.

comment:2 follow-up: Changed 7 years ago by izzy

AH! There is something that may be interesting in this context (and even be the possible cause): There are no versions defined in the project (I only work with milestones there). So the problem could be due to the fact there is no default_version defined (since there is no version at all).

Also in this context: If no versions are defined, Trac suppresses the version field everywhere (this does not necessarily apply to plugins, as we see with ScreenshotsPlugin). So maybe you want to follow this policy as well? Plus: I don't know if you think it makes sense, but how about using the milestones field (if there are milestones defined)? This would be useful for me at least.

If you need further input from my site, just let me know. I could also send you a link to the project so you can check directly there. Plus send you an email with some TRAC_ADMIN login if needed ;)

comment:3 in reply to: ↑ 2 Changed 7 years ago by Blackhex

  • Status changed from assigned to new

Replying to izzy:

AH! There is something that may be interesting in this context (and even be the possible cause): There are no versions defined in the project (I only work with milestones there). So the problem could be due to the fact there is no default_version defined (since there is no version at all).

Three is OR relation between components and versions filters. So if you have defined components in Trac and screenshots are associated with any of these components they should be visible if apropriate component is in default_component. If your screnshots are not associated to any component they should be visible if none is in default_components

The real reason of your problem is the fact that screenshot filter is stored in session of each user. I realize that when I was testing if plugin is really behaving like I described here. You probably set filter to not display target components and then edit default_components to show them. But real filter was already stored in session so you wont't see anything anymore. Just delete cookie for your server and if your default_components is settet up correctly they sould show up.

I admit that this behaviour is little tricky but it should work ok with anonymous user from different UAs. Anyway, I should disable storing of screenshots filter to session if user doesn't have SCREENSHOTS_FILTER permission since it is causing this local problem and it is not necessary to do so.

Also in this context: If no versions are defined, Trac suppresses the version field everywhere (this does not necessarily apply to plugins, as we see with ScreenshotsPlugin). So maybe you want to follow this policy as well? Plus: I don't know if you think it makes sense, but how about using the milestones field (if there are milestones defined)? This would be useful for me at least.

Yes, the empty list box doesn't look really nice. I'll fix that.

If you need further input from my site, just let me know. I could also send you a link to the project so you can check directly there. Plus send you an email with some TRAC_ADMIN login if needed ;)

Thanks, but that is not needed. Just give me a link for your site for curiosity to see plugin in action.

comment:4 Changed 7 years ago by Blackhex

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r3303.

Add Comment

Modify Ticket

Action
as closed The owner will remain Blackhex.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.