#7839 Failed to change permission of discussion

v1.7.0
closed
ss9746 (1)
General
nobody
2017-06-27
2015-02-24
No

https://sourceforge.net/p/forge/site-support/9746/

[forge:site-support:#9746]


I tried to change the permission of discussion "post (Post comments, subject to moderation)", from "anonymous" to "member". It gave me the error:
Error 500
We're sorry but we weren't able to process this request.
Where was I wrong?
Thanks.
Steven.


I was able to duplicate this issue

Discussion

  • Dave Brondsema

    Dave Brondsema - 2016-12-14
    • status: open --> in-progress
    • assigned_to: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2016-12-14
    • status: in-progress --> review
     
  • Dave Brondsema

    Dave Brondsema - 2016-12-14

    Fix on branch db/7839

    This occurs only if the data for project roles somehow has an unnamed role assigned to permissions, which I don't think is possible with the current UI. The error is:

    File '/var/local/allura/Allura/allura/app.py', line 995 in update
      ', '.join(map(lambda role: role.name, filter(None, groups + del_groups))),
    TypeError: sequence item 1: expected string or Unicode, NoneType found
    

    You can reproduce this by creating a new Group in the main permissions page. Then go to a tool's permission page and assign that group to a specific permission. Then remove the group's (role's) name in mongo with: db.project_role.update({name:'myname'}, {$set: {name:null}}). Then on the tool permission page you'll see "None" show, and if you try to delete it or make other changes to that permission, you get the error.

     
  • Kenton Taylor

    Kenton Taylor - 2016-12-15

    Looks good; clear to merge.

     
  • Dave Brondsema

    Dave Brondsema - 2016-12-15
    • status: review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2016-12-15

    Thanks

     
  • Dave Brondsema

    Dave Brondsema - 2017-06-27
    • Milestone: unreleased --> v1.7.0
     

Log in to post a comment.