Thanks Adam,
I'm implementing something similar.  I have a number of other changes in
the works as well, and I'll be pushing a patch release early next week.
Thanks again for you keen eyes and helpful suggestions.
Cheers,
Alexei


Director of Web Development - Farallon Geographics, Inc. - 971.227.3173

On Fri, Nov 20, 2015 at 1:07 PM, Adam Cox <[email protected]> wrote:

> Hi Alexei, my statement was not worded well.  I meant to say that I saw
> the user_can_edit function (which is decorated with @deprecated) in
> context_processors.py, and that it could perhaps be modified to solve the
> issue.  Not a change to deprecated() itself.
>
> I have not looked into this thoroughly enough, but my impression is that
> the user_can_edit sets user_can_edit = True for any site visitor who has
> been authenticated.  Based on what is in the new set_anonymous_user
> function, it looks like any visitor where user.is_anonyous() actually gets
> turned into an authenticated user named "anonymous".  Therefore,
> user_can_edit gets set to true in context_processors.py.  There are
> probably some other variables of which I'm unaware, but the first thought I
> have is something like:
>
> def user_can_edit(request):
>
>     edit = False
>     if request.user.is_authenticated and not request.user.user_name ==
> 'anonymous':
>         edit = True
>     return {
>         'user_can_edit': edit
>     }
>
> Adam
>
>
> On Friday, November 20, 2015 at 1:42:46 PM UTC-6, Alexei Peters wrote:
>>
>> Hi Adam,
>> What would you imagine the @deprecated decorator should do beyond warning
>> the user?
>> -Alexei
>>
>>
>> Director of Web Development - Farallon Geographics, Inc. - 971.227.3173
>>
>> On Fri, Nov 20, 2015 at 10:06 AM, Adam Cox <[email protected]> wrote:
>>
>>> It seems to me that every header.htm be considered "custom" even if no
>>> changes have been made to it, because that file is automatically copied to
>>> my_hip_app/my_hip_app/templates when you first create the app.  So I'm
>>> guessing that this problem would happen when upgrading any app that was
>>> created with an earlier version of arches/arches-hip...
>>>
>>> I saw the @deprecated function in context_processors.py.  If that
>>> function were modified it could solve this issue, right?
>>>
>>> On Fri, Nov 20, 2015 at 12:04 PM, Alexei Peters <[email protected]>
>>> wrote:
>>>
>>>> Hi Adam,
>>>> I'm looking into this right now.  I'll hopefully have a fix soon.
>>>> Cheers,
>>>> Alexei
>>>>
>>>>
>>>> Director of Web Development - Farallon Geographics, Inc. - 971.227.3173
>>>>
>>>> On Fri, Nov 20, 2015 at 7:14 AM, Adam Cox <[email protected]> wrote:
>>>>
>>>>> Hi Alexei and Joel, something very strange is going on now: anonymous
>>>>> users seem to have full write privileges without logging in.  Here's
>>>>> <http://52.34.18.214/search?page=1&termFilter=%5B%7B%22inverted%22%3Afalse%2C%22type%22%3A%22term%22%2C%22context%22%3A%22ff603838-4017-11e5-bc29-efc5b8c809eb%22%2C%22context_label%22%3A%22Name.E41%22%2C%22id%22%3A%22Adam%20Created%20This%20Resourceff603838-4017-11e5-bc29-efc5b8c809eb%22%2C%22text%22%3A%22Adam%20Created%20This%20Resource%22%2C%22value%22%3A%22Adam%20Created%20This%20Resource%22%7D%5D&temporalFilter=%7B%22year_min_max%22%3A%5B%5D%2C%22filters%22%3A%5B%5D%2C%22inverted%22%3Afalse%7D&spatialFilter=%7B%22geometry%22%3A%7B%22type%22%3A%22%22%2C%22coordinates%22%3A%5B%5D%7D%2C%22buffer%22%3A%7B%22width%22%3A%220%22%2C%22unit%22%3A%22ft%22%7D%2C%22inverted%22%3Afalse%7D&mapExpanded=false&timeExpanded=false&include_ids=true>
>>>>> proof.  It is the same for the production instance.
>>>>>
>>>>> Joel are you sure you are using arches 3.1.1?
>>>>>
>>>>> It looks like what's happening is a mix of arches-hip versions and
>>>>> arches versions. Now a user is authenticated as "anonymous", and in your
>>>>> installation the arches context_processors.py file doesn't seem to have
>>>>> been updated to handle this correctly...
>>>>>
>>>>> Adam
>>>>>
>>>>> On Fri, Nov 20, 2015 at 2:11 AM, Joel Aldor <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Hi Alexei,
>>>>>>
>>>>>> I was able to finally fix the website by updating our Apache
>>>>>> 000-default.conf file to reflect the WSGIDaemonProcess arches 
>>>>>> python-path=
>>>>>> /home/ubuntu/Projects/crip:/home/ubuntu/Projects/*ENV2*
>>>>>> /lib/python2.7/site-packages to point to the new ENV2 that I
>>>>>> created, which contains the update. Hence the reason why the website was
>>>>>> not working properly after the upgrade and patch, even though I did
>>>>>> collectstatic twice.
>>>>>>
>>>>>> I think this should be noted on the documentation too, especially if
>>>>>> there were a lot of virtual environments set up and you're using Apache 
>>>>>> for
>>>>>> your production server.
>>>>>>
>>>>>> All good now. Will update our production server in a bit. Thanks a
>>>>>> lot!
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Joel
>>>>>>
>>>>>> On Friday, November 20, 2015 at 3:32:35 PM UTC+8, Alexei Peters wrote:
>>>>>>>
>>>>>>> Hi Joel,
>>>>>>> I don't think collectstatic worked, because I can still see a
>>>>>>> reference to the old knockout.js version (it's currently supposed to be
>>>>>>> 3.3.0).
>>>>>>> You might try running collectstatic with the "-c" option which will
>>>>>>> clear the existing files first.
>>>>>>> Give that a shot.
>>>>>>> Cheers,
>>>>>>> Alexei
>>>>>>>
>>>>>>>
>>>>>>> Director of Web Development - Farallon Geographics, Inc. -
>>>>>>> 971.227.3173
>>>>>>>
>>>>>>> On Thu, Nov 19, 2015 at 11:26 PM, Joel Aldor <[email protected]>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi Alexei,
>>>>>>>>
>>>>>>>> Did that collectstatic command too before this issue was posted.
>>>>>>>>
>>>>>>>> I'll check as well if I need to update my apache config file since
>>>>>>>> I switched to a separate virtual env when I upgraded to this version,
>>>>>>>> although I'm not sure if it has to do with the issue. What do you 
>>>>>>>> think?
>>>>>>>>
>>>>>>>> Joel
>>>>>>>>
>>>>>>>> --
>>>>>>>> -- To post, send email to [email protected]. To
>>>>>>>> unsubscribe, send email to [email protected]. For
>>>>>>>> more information, visit
>>>>>>>> https://groups.google.com/d/forum/archesproject?hl=en
>>>>>>>> ---
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "Arches Project" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to [email protected].
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>> -- To post, send email to [email protected]. To
>>>>>> unsubscribe, send email to [email protected].
>>>>>> For more information, visit
>>>>>> https://groups.google.com/d/forum/archesproject?hl=en
>>>>>> ---
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Arches Project" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to [email protected].
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>> --
>>>>> -- To post, send email to [email protected]. To
>>>>> unsubscribe, send email to [email protected].
>>>>> For more information, visit
>>>>> https://groups.google.com/d/forum/archesproject?hl=en
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Arches Project" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>>
>> --
> -- To post, send email to [email protected]. To unsubscribe,
> send email to [email protected]. For more
> information, visit https://groups.google.com/d/forum/archesproject?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Arches Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- To post, send email to [email protected]. To unsubscribe, send 
email to [email protected]. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to