MapStory / mapstory

MapStory is the free atlas of change that everyone can edit
http://mapstory.org
GNU General Public License v3.0
54 stars 41 forks source link

Edits showing up in edit history as anonymous. #867

Closed jonpmarino closed 7 years ago

jonpmarino commented 7 years ago

Comment: After edits are made, they are attributed to anonymous rather than the storyteller's name. This was dealt with previously in #360

Open #227 in Usersnap Dashboard

Usersnap Feedback - Also seeing edits attributed to "anonymous" in the editor itself. Download original image

Browser: Chrome 59 (macOS Sierra) Referer: https://beta.mapstory.org/maps/edit?layer=geonode:beer_breweries___breweries_21e31ce2&mode=edit Screen size: 1440 x 900 Browser size: 1260 x 752

Powered by usersnap.com

emilyashley commented 7 years ago

Hmm, I can't recreate this locally at all. My local response from the geogig API has my username both under author.name and committer.name and my history is rendering with correct attribution on both layer detail page and in the layer editor.

However BETA response from the geogig API has author.name: anonymous and attributes the committer.name to the owner of the repo?.

was testing on this layer https://beta.mapstory.org/layers/geonode:prisons_8df46c81

{  
   "response":{  
      "success":true,
      "commit":[  
         {  
            "id":"f7ab756ea4928f87b817c29a21f9641d65e71d0e",
            "tree":"986ccc136c424e5bb401d285df7b6bc0f53c2719",
            "parents":{  
               "id":[  
                  "1696522c4bf20b9991d2650c856013d9ff99d619"
               ]
            },
            "author":{  
               "name":"anonymous",
               "email":null,
               "timestamp":1501244916737,
               "timeZoneOffset":0
            },
            "committer":{  
               "name":"sojournertruth",
               "email":"truth@mapstory.org",
               "timestamp":1501244916737,
               "timeZoneOffset":0
            },
            "message":"Added 1 feature to 'prisons_8df46c81' via MapStory Composer."
         },
         {  
            "id":"1696522c4bf20b9991d2650c856013d9ff99d619",
            "tree":"8aee8ff632ec2306bd28b742e7d449c6a371c118",
            "parents":{  
               "id":[  
                  "ef59ee9f04d300c98ec8391e2fb1dccd6b721526"
               ]
            },
            "author":{  
               "name":"anonymous",
               "email":null,
               "timestamp":1501242927857,
               "timeZoneOffset":0
            },
            "committer":{  
               "name":"sojournertruth",
               "email":"truth@mapstory.org",
               "timestamp":1501242927857,
               "timeZoneOffset":0
            },
            "message":"Added 1 feature to 'prisons_8df46c81' via MapStory Composer."
         },
         {  
            "id":"ef59ee9f04d300c98ec8391e2fb1dccd6b721526",
            "tree":"6ace7f3590280522c672be1fc992e460069a2b6e",
            "parents":{  
               "id":[  
                  "5d33b06c328c3436150a2991a3a7ba6056608b6f"
               ]
            },
            "author":{  
               "name":"anonymous",
               "email":null,
               "timestamp":1501242553362,
               "timeZoneOffset":0
            },
            "committer":{  
               "name":"sojournertruth",
               "email":"truth@mapstory.org",
               "timestamp":1501242553362,
               "timeZoneOffset":0
            },
            "message":"Added 1 feature to 'prisons_8df46c81' via MapStory Composer."
         },
         {  
            "id":"5d33b06c328c3436150a2991a3a7ba6056608b6f",
            "tree":"c4dd44b8f8652b1dc1ec709e77a6fc549d280440",
            "parents":{  
               "id":[  
                  "680160498e1c1b25b5278ab274e5ff8bff13b9de"
               ]
            },
            "author":{  
               "name":"admin",
               "email":null,
               "timestamp":1501242265193,
               "timeZoneOffset":0
            },
            "committer":{  
               "name":"sojournertruth",
               "email":"truth@mapstory.org",
               "timestamp":1501242265193,
               "timeZoneOffset":0
            },
            "message":"Added 1 feature to 'prisons_8df46c81' via MapStory Composer."
         },
         {  
            "id":"680160498e1c1b25b5278ab274e5ff8bff13b9de",
            "tree":"ce5389dcee3093c0a454cbed0bdaacf81e9a8975",
            "parents":{  
               "id":[  
                  "29048564f6259742b0e60cc0fc0f4c1e695efa4c"
               ]
            },
            "author":{  
               "name":"anonymous",
               "email":null,
               "timestamp":1501242192863,
               "timeZoneOffset":0
            },
            "committer":{  
               "name":"sojournertruth",
               "email":"truth@mapstory.org",
               "timestamp":1501242192863,
               "timeZoneOffset":0
            },
            "message":"Added 1 feature to 'prisons_8df46c81' via MapStory Composer."
         },
         {  
            "id":"29048564f6259742b0e60cc0fc0f4c1e695efa4c",
            "tree":"6f00e933ce5cd67c398fb52c08c37381ad7db568",
            "parents":{  
               "id":[  
                  "9089255051d772fc9dc98c47f29b13375f03f656"
               ]
            },
            "author":{  
               "name":"sojournertruth",
               "email":"truth@mapstory.org",
               "timestamp":1501015558651,
               "timeZoneOffset":0
            },
            "committer":{  
               "name":"sojournertruth",
               "email":"truth@mapstory.org",
               "timestamp":1501015558651,
               "timeZoneOffset":0
            },
            "message":""
         }
      ]
   }
});

worth noting, admin seems to behave inconsistently even when I make sure to log in/out of geoserver.... 3 of those anonymous name commits are from admin, yet only 1 of them says that (see json above).

I tried with a unverified user, a user that had never created a layer, a user that had never imported a layer, and a user that had done both and my username was returned correctly from geogig for all of them locally, but Beta is behaving inconsistently.

This isn't a front end rendering problem from what I can tell so I'm unassigning myself in the meantime.

Maybe we're either sending the wrong information on beta to geogig via the layer editor, or there's something different about how we create geogig stores on beta & local?

emilyashley commented 7 years ago

Visual confirmation of it working locally: screen shot 2017-07-28 at 4 37 13 am

jonpmarino commented 7 years ago

this appears to be working now on beta based on changes made on August 15. screen shot 2017-08-15 at 4 16 16 pm