     fullname = getFullnameFromAccount data
     nickname = data.profile.nickname
     email    = "#{nickname}@koding.com"
-    role     = 'Member'
 
     return """
       <div class="details">

kd                     = require 'kd'
JView                  = require 'app/jview'
AvatarView             = require 'app/commonviews/avatarviews/avatarview'
KDButtonView           = kd.ButtonView
KDListItemView         = kd.ListItemView
KDCustomHTMLView       = kd.CustomHTMLView
getFullnameFromAccount = require 'app/util/getFullnameFromAccount'

# a user be a Member, Admin and Owner at the same time but in the UI we should
# show the role name which has the most permissions.
defaultRoles =
  guest      : nicename : 'Guest',     priority : 0
  member     : nicename : 'Member',    priority : 1
  moderator  : nicename : 'Moderator', priority : 2
  admin      : nicename : 'Admin',     priority : 3
  owner      : nicename : 'Owner',     priority : 4


module.exports = class MemberItemView extends KDListItemView


  createSettingsView: ->

    unless @settings
      @settings  = new KDCustomHTMLView
        cssClass : 'settings hidden'

    buttons = buttonSet[@loggedInUserRole.slug][@memberRole.slug]

    buttons.forEach (button) =>
      buttonView = new KDButtonView
        cssClass : kd.utils.curry 'solid compact outline', button.extraClass
        title    : button.buttonTitle
        loader   : color: "#444444"
        callback : => @emit 'UserRoleChangeRequested', button.slug

      @actionButtons[button.slug] = buttonView
      @settings.addSubView buttonView





  toggleSettings: ->

    @settings.toggleClass  'hidden'
    @roleLabel.toggleClass 'active'

