Issue #156 resolved

+rename keeps the last editor as author

Anonymous created an issue

when you rename an item, the current user is not set in USERID meta. so the old USERID is saved.

Here some code I think that fix it. It's a good ideia to put this in tests too.



def _rename(self, name, comment, action, delete=False): new_name = name meta = self.prepare_meta_for_modify(self.meta) if flaskg.user.valid: del meta[USERID] self._save(meta,, name=new_name, action=action, comment=comment, delete=delete) for child in self.get_index(): item = Item.create(child[0]) meta = item.prepare_meta_for_modify(item.meta) if flaskg.user.valid: del meta[USERID] new_name = u'/'.join((name, child[1])) item._save(meta,, name=new_name, action=action, comment=comment, delete=delete)


Comments (4)

  1. Thomas Waldmann repo owner

    hmm, guess the previous userid meta should get killed in ANY case (not just if user is valid). if a anon user is doing the rename, we still do no want to keep the previous userid.

  2. Log in to comment