This user model is used in order to access the GC User model within the app, which depends on Group Control. This has abundant use cases, and all of our current apps use
the user model. To make sure that any changes to the GC User model are accommodated within the apps, you must import this user model rather than defining your own. That can be done
by making a model/user.js
file in your app, and setting it to the following export statment:
export {default} from '@bennerinformatics/ember-fw-gc/models/user';
Additionally, in order to properly make this model work, you must accompany it with the proper adapter (so that it doesn't look for a User Serverside Model in your own app). See fw-app if you need more information about that.
After you have done these two steps, you can use user as any other Ember model, and it will properly get the data from Group Control.
Methods
inDept
StringThis property is saved in Group Control and a boolean of whether the user is in the current department (as a regular user, not a guest user). This is used to filter dropdowns so not all users show up in them (you should almost always filter all your dropdowns by inDept = true, unless you have a clear reason for wanting all possible users).
Default: true
nameFirst
StringThis property is saved in Group Control and is a string of the first name of the user.
nameFormalLower
ComputednameFormalLower is a computed property used in nameMatches
and other lookups, which is simply the lowercase version of the user's formal name (ie {nameFirst nameLast}
regardless if there is a namePref defined or not).
nameFull
ComputednameFull is a computed property, which returns the full name of the user ({nameSort nameLast}). If either nameSort or nameLast is empty, it will return the userId instead.
nameFullLower
ComputednameFullLower is a computed property used in nameMatches
and other lookups, which is simply the lowercase version of nameFull
.
nameLast
StringThis property is saved in Group Control and is a string of the last name of the user.
namePref
StringThis property is saved in Group Control and is a string of the preferred name (nickname) of the user.