Interface appears to be readonly (no edit buttons) with authenticated-user-header

45 views
Skip to first unread message

Nicola Worthington

unread,
Jul 9, 2019, 4:05:16 PM7/9/19
to tiddl...@googlegroups.com
Hey guys and gals.

I have just upgraded my TiddlyWiki to 5.1.19 running under Node v12.6.0 in an Alpine Docker container (node:12-alpine). Previously I was running TW 5.1.16 under node:9.5.0-alpine, using the older deprecated --server argument.

Since upgrading to the latest version, I have changed over to use the newer --listen argument, in conjunction with the authenticated-user-header=x-remote-user and writers=(authenticated) options. I can see in the TW debug log output that the HTTP header X-Remote-User is being passed through and detected correctly and that TW has identified that the authenticatedUser=nicolaw. When I go to the TW in the browser I can see that $:/status/UserName tiddler shows my authenticated username nicolaw, and that $:/status/IsLoggedIn says yes.

...however, I still don't see any new tiddler, new journal, edit, delete, or any other write access toolbar buttons. I have double checked that those buttons are indeed enabled under the control panel appearance toolbars tabs.

These are the documentation pages that I have been following:
 

My full command line to invoke TW is as follows:

tiddlywiki mywiki \
  --listen \
    "port=8080" \
    'root-tiddler=$:/core/save/all' \
    "root-render-type=text/plain" \
    "tiddler-render-type=text/html" \
    "anon-username=anonymous" \
    "authenticated-user-header=x-remote-user" \
    "host=0.0.0.0" \
    "readers=(anon)" \
    "writers=nicolaw,(authenticated)" \
    "debug-level=full"

TW debug log output looks like this (confirming the username is recognized):

Request path: {"protocol":null,"slashes":null,"auth":null,"host":null,"port":null,"hostname":null,"hash":null,"search":null,"query":null,"pathname":"/recipes/default/tiddlers.json","path":"/recipes/default/tiddlers.json","href":"/recipes/default/tiddlers.json"}
Request headers: {"host":"tiddlywiki:8080","authorization":"Basic REDACTEDDIGESTHASH","accept":"application/json","x-requested-with":"TiddlyWiki","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.90 Safari/537.36","referer":"https://REDACTEDURL/","accept-encoding":"gzip, deflate, br","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","cookie":"__utmc=REDACTEDGOOGLEANALYTICSCOOKIE","x-remote-user":"nicolaw","x-forwarded-for":"REDACTEDIP","x-forwarded-host":"REDACTEDHOST","x-forwarded-server":"REDACTEDHOST","connection":"Keep-Alive"}
authenticatedUsername: nicolaw

Can anybody offer any advice on what I might have forgotten or done wrong?

Jeremy Ruston

unread,
Jul 9, 2019, 4:56:03 PM7/9/19
to tiddl...@googlegroups.com
Hi Nicola

Thanks for the clear report. It's not immediately obvious what’s going on. The visibility of the editing controls is determined by the value of $:/status/IsReadOnly; you should be able to manually set it to “yes” and get back the edit controls. In that case it would be interesting to see what happens if you attempt to create or edit a tiddler.

It’s worth reviewing any overridden shadow tiddlers (there’s a canned search under the advanced search “filter” tab that lets you see a list of overridden shadow tiddlers).

If you're familiar with the browser developer console, can you open dev tools, switch to the network tab, and then refresh the page you should see a listing of the network requests made by the client. Click on the name “status”, and then please report the content of the “Response” tab.

Good luck!

Best wishes

Jeremy





On 9 Jul 2019, at 21:05, Nicola Worthington <nic...@tfb.net> wrote:

Hey guys and gals.

I have just upgraded my TiddlyWiki to 5.1.19 running under Node v12.6.0 in an Alpine Docker container (node:12-alpine). Previously I was running TW 5.1.16 under node:9.5.0-alpine, using the older deprecated --server argument.

Since upgrading to the latest version, I have changed over to use the newer --listen argument, in conjunction with the authenticated-user-header=x-remote-user and writers=(authenticated) options. I can see in the TW debug log output that the HTTP header X-Remote-User is being passed through and detected correctly and that TW has identified that the authenticatedUser=nicolaw. When I go to the TW in the browser I can see that $:/status/UserName tiddler shows my authenticated username nicolaw, and that $:/status/IsLoggedIn says yes.

...however, I still don't see any new tiddler, new journal, edit, delete, or any other write access toolbar buttons. I have double checked that those buttons are indeed enabled under the control panel appearance toolbars tabs.

These are the documentation pages that I have been following:
 

My full command line to invoke TW is as follows:

tiddlywiki mywiki \
  --listen \
    "port=8080" \
    'root-tiddler=$:/core/save/all' \
    "root-render-type=text/plain" \
    "tiddler-render-type=text/html" \
    "anon-username=anonymous" \
    "authenticated-user-header=x-remote-user" \
    "host=0.0.0.0" \
    "readers=(anon)" \
    "writers=nicolaw,(authenticated)" \
    "debug-level=full"

Can anybody offer any advice on what I might have forgotten or done wrong?


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7b4b64c3-99ed-4727-b5f4-7447d9900c99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nicola Worthington

unread,
Jul 9, 2019, 5:42:00 PM7/9/19
to tiddl...@googlegroups.com
Hi Jeremy,

Wow, quick response!

I double checked the status request, which looks correct as expected However there was a custom version of the core syncer.js module shadow tiddler. I removed that from disk and restarted, and it now worked perfectly. 

Bit embarrassing I didn't think of that.

Many thanks for the help!  

You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/OOv8m6aWHUo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages