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

Feature/private pages #579

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

Jassob
Copy link

@Jassob Jassob commented Oct 21, 2016

We are using Gitit at the Student Division for Computer Science and Engineering at Chalmers Uni.

We implemented private pages for our own wiki and thought that we should push it upstreams.
Feedback is appreciated!

Added functions and types for handling private pages.
Added a handler predicate, unlessPrivatePage, that takes two handlers as
arguments and runs the first if the requested page is not listed as a
private page, otherwise it runs the fallback handler.

Also wired up the predicate with the default gitit settings.
@Jassob
Copy link
Author

Jassob commented Oct 21, 2016

Oops, this is not working correctly

@Jassob Jassob closed this Oct 21, 2016
@Jassob Jassob reopened this Oct 21, 2016
@Jassob
Copy link
Author

Jassob commented Oct 21, 2016

Now it works more as it should.

(Previous commit did not allow logged in users to view the private pages, somehow I did not test that part..)

@jgm
Copy link
Owner

jgm commented Oct 25, 2016

Can you say more about what "private pages" are?
Could it be documented in the manual?

@Jassob
Copy link
Author

Jassob commented Oct 27, 2016

Oh, of course!

In our organization we have some pages that are public and that everyone can see, but for some pages we want to only let logged in members view them.
This is what private pages aims to enable.
I added a field in the config in which one can specify with regex which pages will be private, i.e that only logged in members can view the pages (otherwise they will be redirected to the login page).

If by manual you mean the readme I could of course write some documentation there as well!
I did not think about it before.

@fdagnat
Copy link

fdagnat commented Jul 3, 2019

May I ask, if there is any reason for not integrating this patch? I find it useful and use it. I may write some documentation if that is what is missing.

@Jassob
Copy link
Author

Jassob commented Jul 3, 2019

I think it probably is because I never got around to write any documentation for it... Life happened and now our organization changed wiki-engine, so we're no longer using this patch ourselves.

@Jassob
Copy link
Author

Jassob commented Jul 3, 2019

I'm glad to hear that you find the patch helpful!
Feel free to write the missing documentation if you want, you probably know the existing documentation and the added feature better than I do anyway 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants