mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2026-10-30 15:24:31 +00:00
ScopeAccess component implementation (#154)
* component based on enumScope
* apply review comments
* add store props
* Revert "add store props"
This reverts commit 0e0978c5f3.
* Tests for ScopedAccess (#156)
* Tests for ScopedAccess
* Create cypress mountTestProvider
Co-authored-by: eglehelms <e.helms@cognigy.com>
Co-authored-by: Brandon Lee Kitajchuk <bk@kitajchuk.com>
This commit is contained in:
15 files changed
+201
-91
No files matched your search
+16
-12
@@ -19,13 +19,6 @@ export type UserPermissions =
|
||||
| "PROVISION_SERVICES"
|
||||
| "PROVISION_USERS";
|
||||
|
||||
// We'll want something like this for actual permissions implementation...
|
||||
// export enum UserPermissions {
|
||||
// VIEW_ONLY = 0,
|
||||
// PROVISION_SERVICES = 1,
|
||||
// PROVISION_USERS = 2,
|
||||
// }
|
||||
|
||||
/** Status codes */
|
||||
|
||||
export enum StatusCodes {
|
||||
@@ -106,21 +99,24 @@ export interface PasswordSettings {
|
||||
/** API responses/payloads */
|
||||
|
||||
export interface User {
|
||||
scope?: UserScopes;
|
||||
scope: UserScopes;
|
||||
user_sid: string;
|
||||
name: string;
|
||||
email: string;
|
||||
is_active: boolean;
|
||||
force_change: boolean;
|
||||
account_sid?: string | null;
|
||||
service_provider_sid?: string | null;
|
||||
account_sid: string | null;
|
||||
service_provider_sid: string | null;
|
||||
initial_password?: string;
|
||||
permissions?: UserPermissions;
|
||||
permissions?: UserPermissions[];
|
||||
}
|
||||
|
||||
export interface UserLogin extends User {
|
||||
export interface UserLogin {
|
||||
token: string;
|
||||
force_change: boolean;
|
||||
scope: UserScopes;
|
||||
user_sid: string;
|
||||
permissions: UserPermissions[];
|
||||
}
|
||||
|
||||
export interface UserLoginPayload {
|
||||
@@ -140,6 +136,14 @@ export interface UserUpdatePayload {
|
||||
account_sid: string | null;
|
||||
}
|
||||
|
||||
export interface UserJWT {
|
||||
scope: UserScopes;
|
||||
user_sid: string;
|
||||
account_sid?: string | null;
|
||||
service_provider_sid?: string | null;
|
||||
permissions: UserPermissions[];
|
||||
}
|
||||
|
||||
export interface ServiceProvider {
|
||||
name: string;
|
||||
ms_teams_fqdn: null | string;
|
||||
|
||||
Reference in new issue
Block a user