[pmwiki-users] wikish checking if user logged in

Mark Lee mark.lee.phd at gmail.com
Sat Jun 29 09:56:20 CDT 2013

The security of wikish is working. I just experimented with the various
installation options. If I am not logged-in, wikish tries to execute a "cp"
command, but is blocked. I get this error message in the header "ERROR:
cp(Tmp.X Experiments.Locations): Unable to write pages. Not enabled.".

My site is secure, but I was looking for a response that looks more
friendly. In addition to the built-in security of wikish, I was hoping to
add a check of the "logged-in state", the way the skin does when it decides
on the display of  the "logout" link. I would do this check in wikish. If
logged in, I execute the commands. If not logged in, then nothing is
executed on that page. So I would get the security that is built into
wikish, plus the ability to bypass wikish commands on whatever page I
choose through if-then logic in the wiksh code for those pages.

I found this to work the way I wanted:

if test -n "$AuthId"
.... wikish code goes here and executes only if logged in.....


On Sat, Jun 29, 2013 at 5:27 AM, Peter Bowers <pbowers at pobox.com> wrote:

> It's not a different version but rather a different way of installing it -
> a different configuration.  Apparently you have installed it in such a way
> that it is limited to only administrators using it.
> If you will go to this page:
> http://www.pmwiki.org/wiki/Cookbook/WikiShConfig
> you will see 6 different example configurations.
> -Peter
> On Fri, Jun 28, 2013 at 11:44 PM, Mark Lee <mark.lee.phd at gmail.com> wrote:
>> I have a solution for interaction between wikish and javascript for my
>> applicationt. I have a file called Experiments.Locations that I write data
>> to with the freshest values of some parameters, but I only want to do this
>> if I am logged in. If I am not logged in, I will not write to the file, but
>> use the values set when I was last logged in. The version of wikish code
>> that I have does not checked to see if I am logged in as admin, so if I am
>> not logged in I get errors, and then it loads in the values last set. How
>> to I check in wikish if I am logged in to avoid the erros when I am not
>> logged in?
>> -Mark
>> _______________________________________________
>> pmwiki-users mailing list
>> pmwiki-users at pmichaud.com
>> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20130629/9259ff5c/attachment.html>

More information about the pmwiki-users mailing list