Restrict master saving

68 views
Skip to first unread message

Jesper Hansen

unread,
Jul 27, 2016, 4:26:56 AM7/27/16
to TiddlyWiki
Hi!

I've been messing with tiddlywiki 5 for a while, and first off i'd like to say thanks - it really is a great and powerful tool when you figure out how to work with it :)

I'm working with a local html wiki that I renamed to the .hta file extension to enable direct saving -  what I would like to do is restrict the ability to master save the wiki (preferably with a password) as only certain people should be able to save the wiki.

I did some searching, and it looks like it is possible to remove the save button alltogether, but this will complicate saving for the people who should actually be able to do it.

Any ideas?

PMario

unread,
Jul 27, 2016, 8:12:40 AM7/27/16
to TiddlyWiki
Hi Jesper,

If you activate the "ReadOnly" theme. ... RightSidebar: Tools: theme button: select "ReadOnly" ... you get a slightly modified UI. ...
The save button is also there. Just 4 buttons down.

That's not optimal but simple to achieve without any modifications. .... But be aware, that the tiddler menue: more dropdown   still contains a delete button, which works and probably causes an "autosave" ...

So all in all ... as you found out... suboptimal :/

There have been some discussions in the group, but imo there is no generic solution, which keeps a simple editors UI and possibilities, but prevents the user from accidentally changing something. .. At least I don't know it :)

-m

Matthew Lauber

unread,
Jul 27, 2016, 8:37:45 AM7/27/16
to TiddlyWiki
If you can use the nodejs version, I've got a nginx config that can proxy the site and use auth_basic to limit write requests while allowing read requests.

    location /wiki/ {
        limit_except GET HEAD {
            auth_basic 'Restricted';
            auth_basic_user_file /etc/nginx/auth/tiddlywiki;
        }
        proxy_pass   http://127.0.0.1:8888/;
        proxy_set_header        Host             $host;
        proxy_set_header        X-Real-IP        $remote_addr;
        proxy_set_header        X-Forwarded-For  $proxy_add_x_forwarded_for; 
    }


This basically shows up as a standard browser username/password popup.  But it only works with the nodejs version, and doesn't hide the save button, just 403's the save requests.

RichardWilliamSmith

unread,
Jul 27, 2016, 11:12:42 AM7/27/16
to TiddlyWiki
Just hide the save button somewhere noone will look - somewhere in the menus or in a hidden tiddler they have to know the name of - yoiu can bury a link to it somewhere that just renders as a single 'period', for example - those who don't know it's there will never even notice it.

Someone who knows how Tiddlywiki works will always be able to save it.

RR
Reply all
Reply to author
Forward
0 new messages