WRI-Cities / static-GTFS-manager

GUI interface for creating, editing, exporting of static GTFS data for a public transit authority
GNU General Public License v3.0
147 stars 46 forks source link

Disable password prompt #132

Closed johanricher closed 5 years ago

johanricher commented 5 years ago

Since a lot of use cases for static-GTFS-manager are covered by a local installation on a desktop computer, wouldn't it be relevant to allow those users to disable the password locking? Would it be possible to easily change this setting in a config file?

Even for a server installation, I think it would be preferable to have a single password prompt at the start of a session. The current implementation forces users to re-enter the password at every change on every page, which is quite annoying in my opinion.

answerquest commented 5 years ago

Hi @johanricher , you're right. I had put in the password feature initially when this program was meant to run on a web server and there was a big risk of others on the network accidentally messing with things. I haven't used any frameworks that natively enable remembering a user/browser session, and I wanted to avoid using any cookies, so this was a workaround.

But I see your point that for users that are actually using the tool fully (ie, making many edits), this is a major hindrance.

I'll look into various options to make things easier. Putting something in the config folder may be the best path to take. There are users who are deploying this on a public-facing web server, so I don't want to completely remove the editing protections.

For now, here's a workaround at the Javascript end; it'll work without having to regenerate the binaries:

  1. Open js/commonfuncs.js

  2. Find this code block around line 90:

    });
    // ############################
    // FUNCTIONS
  3. Insert this line just above those lines:

    document.getElementById("password").value = "program";
  4. Change the "program" value above to your password if you have set it differently.

  5. There, now the password field should get auto-loaded at all pages.

johanricher commented 5 years ago

Thanks for your answer @answerquest (and all your good work on this awesome project). Looking forward to an easy configuration of this. I'll try the workaround in the meantime.