Fossil Forum

Check and merge forum-skin-links branch
Login

Check and merge forum-skin-links branch

Check and merge forum-skin-links branch

(1) By Warren Young (wyetr) on 2018-08-08 13:23:05 [link] [source]

I've just checked in branch forum-skin-links to add a Forum navbar entry before Tickets for all skins, pointing at /forum if the user has suitable capabilities.

I think I've got the logic as simple as possible, since anycap doesn't appear to check for the anonymous user's capabilities as well as the logged-in user's capabilities, and I don't see an anonanycap type of command in TH1.

(2) By Martijn Coppoolse (vor0nwe) on 2018-08-09 22:32:18 in reply to 1 [source]

I seem to recall anoncap, or does that not do what you need?

(I'm on mobile, so can't check rn).

(3) By Warren Young (wyoung) on 2018-08-09 23:40:10 in reply to 2 [link] [source]

anoncap checks whether all capabilities match for the anonymous user category, whereas anycap checks whether any capability matches for a specific user. I want something halfway between: check whether anonymous has any of several capabilities.

What the checkin does instead is

  if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {

It works; it's just awkward.

(4) By Martijn Coppoolse (vor0nwe) on 2018-08-10 08:43:31 in reply to 3 [link] [source]

I see, apparently I misremembered. Apologies!

(5) By Warren Young (wyoung) on 2018-08-25 16:59:29 in reply to 1 [link] [source]

Is there a good reason this branch isn't merged yet? As I said, I think it's sane, but since it's a taste thing, I don't want to merge it unilaterally. If it's unacceptable, I'd like to know why so I can learn to make better commits.

I made my forumPost commit directly on trunk, since I think it's uncontroversial, but the next logical step is to change the skins to start using it. I'm willing to do that work; I think it should be done on a branch, since it'll need to be tested before being merged to trunk, but I'm now hesitant to check something else in that might also be ignored.

(6) By Richard Hipp (drh) on 2018-08-25 17:04:23 in reply to 5 [link] [source]

I think it would be fine to go ahead and merge that branch.

(7) By Warren Young (wyoung) on 2018-08-25 17:24:54 in reply to 6 [link] [source]

Done, thanks!