Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

channel details user template: show role according to affiliation

  • Loading branch information...
commit 4d48fe05970898216e1ab6d5ad3281e553c8646d 1 parent babfa8a
@astro astro authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/templates/channel/details/user.coffee
View
11 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 ->
Please sign in to comment.
Something went wrong with that request. Please try again.