mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 22:28:13 +00:00
[Identity] Provide an undefined identity
Provide an undefined identity by default, instead of an Unknown User. This suppresses display of identity-related features (such as the identity indicator) while still providing a default implementation of the identityService for platform components to utilize. nasa/openmctweb#99
This commit is contained in:
@ -30,20 +30,18 @@ define(
|
||||
function () {
|
||||
"use strict";
|
||||
|
||||
var UNKNOWN_USER = {
|
||||
key: "unknown",
|
||||
name: "Unknown User"
|
||||
};
|
||||
|
||||
/**
|
||||
* Default implementation of an identity service. Provides an
|
||||
* unkown user.
|
||||
* unknown user as an `undefined` value; this is present simply
|
||||
* to ensure that there is always an `identityService` available
|
||||
* for platform components to use.
|
||||
*
|
||||
* @constructor
|
||||
* @implements {IdentityService}
|
||||
* @memberof platform/identity
|
||||
*/
|
||||
function IdentityProvider($q) {
|
||||
this.userPromise = $q.when(UNKNOWN_USER);
|
||||
this.userPromise = $q.when(undefined);
|
||||
}
|
||||
|
||||
IdentityProvider.prototype.getUser = function () {
|
||||
|
Reference in New Issue
Block a user