Permalink
Browse files

channel details user template: show role according to affiliation

  • Loading branch information...
astro committed Feb 27, 2012
1 parent babfa8a commit 4d48fe05970898216e1ab6d5ad3281e553c8646d
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/templates/channel/details/user.coffee
@@ -70,10 +70,13 @@ module.exports = design (view) ->
name.text "#{user.get 'id'}"
affiliation = user.getAffiliationFor channel.get 'id'
role?.text "#{userspeak[affiliation] or affiliation}"
- if app.users.isAnonymous(app.users.current)
- role.remove()
- delete role
-
+ update_role = =>
+ if app.users.current.canEdit channel
+ role.show()
+ else
+ role.hide()
+ view.parent.parent.parent.bind 'update:permissions', update_role
+ update_role()
@$section class:'action changeRole', ->
@$select ->

0 comments on commit 4d48fe0

Please sign in to comment.