Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password protection / page locking #8

Closed
schollz opened this issue Feb 8, 2016 · 3 comments
Closed

Password protection / page locking #8

schollz opened this issue Feb 8, 2016 · 3 comments

Comments

@schollz
Copy link
Owner

schollz commented Feb 8, 2016

I think password protection could be done like this:

In an editable page a user can leave a special line, like

<user=zack password=123 public=true>

which has the advantage of not being rendered because its not valid HTML (all invalid HTML is removed on server rendering).

When this is saved into the server, the server will no longer allow anyone to enter the edit page or /list page. Instead it will always redirect to the /view page. If public=false is set, then the /view page can redirect to a password form for login. If public=true is set, then the /view page will display normally. In both cases, once the /view page is rendered, the "Edit" button should change to "Edit (with password)", which on click, asks for a password so that the user can go back to edit their page.

@schollz schollz changed the title Password protection Password protection / page locking Feb 8, 2016
@schollz
Copy link
Owner Author

schollz commented Feb 8, 2016

Better alternative (no need to remember keywords):
On the editing page, have a button on the edit page that says "Lock" and a button that says "Privatize." Both buttons will ask for a password and the password will be saved for the page.

Lock

The "Lock" button will serve redirect all traffic to the /view page. Once on the /view page, clicking "Edit" will prompt a password before going to the Edit page. It will then load the Edit page as a POST request using the password as argument. If the password is wrong, it will again redirect to the /view page.

Privatize

The "Privatize" button will serve to redirect all traffic to a /login page that will then goto the view page. DIFFICULT

@schollz
Copy link
Owner Author

schollz commented Feb 8, 2016

Will this remove the wiki-ness of these pages? Not sure if I want to do this, so I'm putting a wontfix on it.

@schollz
Copy link
Owner Author

schollz commented Mar 14, 2016

Encryption added! e97bfb0

@schollz schollz closed this as completed Mar 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant