fleet/frontend/interfaces/user.ts
RachelElysia aeb852e168
Remove username from UI (#1168)
* Remove username from UI code
* Remove username from tests
* Remove username from database
* Modify server endpoints for removing username
* Implement backend aspects of removing username
* Update API docs
* Add name to fleetctl
2021-06-24 13:42:29 -07:00

38 lines
843 B
TypeScript

import PropTypes from "prop-types";
import teamInterface, { ITeam } from "./team";
export default PropTypes.shape({
email: PropTypes.string,
force_password_reset: PropTypes.bool,
api_only: PropTypes.bool,
global_role: PropTypes.string,
gravatar_url: PropTypes.string,
id: PropTypes.number,
name: PropTypes.string,
sso_enabled: PropTypes.bool,
teams: PropTypes.arrayOf(teamInterface),
});
export interface IUser {
email: string;
force_password_reset: boolean;
api_only: boolean;
global_role: string | null;
gravatar_url: string;
id: number;
name: string;
sso_enabled: boolean;
teams: ITeam[];
}
/**
* The shape of the request body when updating a user.
*/
export interface IUserUpdateBody {
global_role?: string | null;
teams?: ITeam[];
name?: string;
email?: string;
sso_enabled?: boolean;
}