API Docs for:
Show:

components.User Class

Defined in: bundle.js:4813
Module: filesize

Client user mode

Methods

createdAt

() Date

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:12

Returns:

Date:

deletedAt

() Date

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:36

Returns:

Date:

dispose

()

Inherited from models.client.Base but overwritten in models/client/Base.js:191

Call when not using this model anymore. Unbinds all event listeners.

getDomainUsername

() String

Inherited from models.UserMixin but overwritten in models/UserMixin.js:89

Returns:

String:

getEmail

() String

Inherited from models.UserMixin but overwritten in models/UserMixin.js:106

Returns:

String:

getExternalId

() String

Inherited from models.UserMixin but overwritten in models/UserMixin.js:98

Returns:

String:

getFullName

() String

Inherited from models.UserMixin but overwritten in models/UserMixin.js:114

Returns:

String:

getOrganisationAdminVisibility

() String

Inherited from models.UserMixin but overwritten in models/UserMixin.js:36

Returned in User#getVisibilities() if the user is an organisation admin

Returns:

String:

getOrganisationDomain

() String

Inherited from models.UserMixin but overwritten in models/UserMixin.js:70

Returns:

String:

getOrganisationName

()

Inherited from models.UserMixin but overwritten in models/UserMixin.js:125

Get human readable organisation name

getOrganisationVisibility

() String

Inherited from models.UserMixin but overwritten in models/UserMixin.js:28

Returns:

String:

getPersonalVisibility

() String

Inherited from models.UserMixin but overwritten in models/UserMixin.js:19

Returns:

String:

getProfileImage

() String

Inherited from models.UserMixin but overwritten in models/UserMixin.js:135

Returns:

String:

url to the profile image

getUsername

() String

Inherited from models.UserMixin but overwritten in models/UserMixin.js:78

WARNING this is not unique between different organisations in puavo-ticket. Use User#getDomainUsername() when possible.

Returns:

String:

getVisibilities

() Array

Inherited from models.UserMixin but overwritten in models/UserMixin.js:46

Get visibility strings for the user

Returns:

Array:

Array of visibility strings. Eg organisation:testing.opinsys.fi

hasVisibility

(
  • visibility
  • models
)

Visibility assertion helper

Parameters:

  • visibility String
  • models Array

    Array of models.server.Visibility models

Returns:

Boolean

isEmailOnly

() Boolean

Inherited from models.UserMixin but overwritten in models/UserMixin.js:153

Return true for users that have not ever logged in puavo-ticket and have used it only via email

Returns:

Boolean:

isImage

() Boolean

Inherited from models.UserMixin but overwritten in public/build/bundle.js:3550

Return true if the attachment is an image which can be displayed in a tag

Returns:

Boolean:

isSame

(
  • other
)

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:48

Return true if the other object is built using the same constructor and they have the same id

Parameters:

Returns:

Boolean

isSoftDeleted

() Boolean

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:28

Returns:

Boolean:

rel

(
  • key
)
Object | Array

Inherited from models.client.Base but overwritten in models/client/Base.js:145

Return relation data for given key or throw if it's not loaded

Parameters:

  • key String

Returns:

Object | Array:

Relation data

save

() Bluebird.Promise

Inherited from models.client.Base but overwritten in models/client/Base.js:163

Save model to server http://backbonejs.org/#Model-save

Returns:

Bluebird.Promise:

with the new saved model

toURL

() String

Inherited from models.UserMixin but overwritten in public/build/bundle.js:3562

Return url to this attachment

Returns:

String:

uniqueId

() String

Inherited from models.client.Base but overwritten in models/client/Base.js:134

Returns:

String:

updatedAt

() Date

Inherited from models.BaseMixin but overwritten in models/BaseMixin.js:20

Returns:

Date:

wasCreatedInVicinity

() Boolean

Inherited from models.client.Base but overwritten in models/client/Base.js:200

Return true if the another model was created within 60 seconds of this one by the same user

Returns:

Boolean:

Properties

idAttribute

String

Inherited from models.client.Base but overwritten in models/client/Base.js:119

Use unique_id from models.server.Base as the model id. We need this to be able to put models of diffent type to a single Backbone collection http://backbonejs.org/#Model-idAttribute

saving

Bluebird.Promise | Null

Inherited from models.client.Base but overwritten in models/client/Base.js:182

Promise of the saving operation instantiated by Base#save(). Available only when the operation is ongoing.