16 lines
284 B
CoffeeScript
16 lines
284 B
CoffeeScript
|
AuthorityMap =
|
||
|
"1": ""
|
||
|
"2": "+"
|
||
|
"3": "%"
|
||
|
"4": "@"
|
||
|
"5": "~"
|
||
|
|
||
|
class @User extends Backbone.Model
|
||
|
initialize: (attributes) =>
|
||
|
|
||
|
getDisplayName: =>
|
||
|
authorityString = AuthorityMap[@get('authority')] ? ""
|
||
|
"#{authorityString}#{@get('id')}"
|
||
|
|
||
|
isAlt: =>
|
||
|
@get('isAlt')
|