Well getting all of them working together is not a trival work for a Perl newbie like me. Andway I’ve found my way in, so here’s some notes:
The Mason doc by “perldoc HTML::Mason” suggested to run Mason with mod_perl, However, that requires /usr/ports/www/p5-libapreq2. It took me some time to find this out and then I send a PR to add the RUN_DEPENDS. The maintainer and I have some mails back and force and we find adding an option is a better idea.
Here is the httpd.conf changes needed to get Mason work:
LoadModule apreq_module libexec/apache2/mod_apreq.so
PerlModule Apache2
This is for Mason:
And by default the serverroot of Apache on FreeBSD is “/usr/local”, and Mason datadir gets to “/usr/local/mason”. I don’t want to change the serverroot so
to set the
to some other place and chown to www:www.
PerlHandler HTML::Mason::ApacheHandler
</Location>
After all these Mason should work.
Then comes planner-authz.el. The lisp part works like a charm. However the Perl part is a BIG task for me. At the very beginning I even didn’t realize that there is a authz.mas comes in the elisp code and go straight to bother the author :(. Perl frightened me
First the Mason complains it can’t find the user object. After some document reading it looks the author is using Apache1 and mod_perl, while I’m using Apache2 and mod_perl2. The interface of mod_perl changed and I need to remove the “connection” part.
Now Mason won’t complain, but it prints all the <authz> tag on the web pages. After a good reading of Mason documents I realize that the perl code in the embed file should be on lines starting by “%”. Maybe this is a change between Mason versions and the author of planner-authz.el didn’t obey this in the default authz.mas.
Now comes the auth part. I want some users with real login can visit some secure info, while others can just hit RET or ESC at the login dialog and visit the public info. The wired think is that I can’t get
and
work together. I nearly go to Apache2.1 for the
. And finaly I realized I need to turn
off.
The planner-authz.el author send me a new version and the “%” thing is fixed, and I also report the apache v1/v2 thing.
And here is some of my wish list for planner-authz as I sent to the mail list:
A “#authz” directive that opens the project to everyone. I want to protect most of my pages so I have `planner-authz-project-default’ set. And this makes anonymous users (without a user id) can’t access any page. Is there some thing like a “#authz all” or “#authz nil” that opens the page to everyone?
Access control based on section name. I have some extra sections except for tasks, notes, and appt. And I’m missing something like
("sectionC" . all))
One way to do this is to surround the section with <authz> tag before planner-authz do the real work and remove them when the work is done
I’m using planner-trunk and for some subsections all the content are hidden and only the subsection title is left. This is not a big issue, though
Post a Comment
You could use <code type="name"> to get your code colorized