mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 23:30:10 +00:00
instaceOfUserTenantAccessPermission
This commit is contained in:
parent
cba6e4deb9
commit
ea124d5505
@ -23,7 +23,7 @@ import PositiveNumber from '../Types/PositiveNumber';
|
||||
import Route from '../Types/API/Route';
|
||||
import TableColumnType from '../Types/Database/TableColumnType';
|
||||
import Permission, {
|
||||
instaceOfUserTenantAccessPermission,
|
||||
instanceOfUserTenantAccessPermission,
|
||||
PermissionHelper,
|
||||
UserPermission,
|
||||
UserTenantAccessPermission,
|
||||
@ -506,7 +506,7 @@ export default class BaseModel extends BaseEntity {
|
||||
let userPermissions: Array<Permission> = [];
|
||||
|
||||
if (
|
||||
instaceOfUserTenantAccessPermission(userProjectPermissions) &&
|
||||
instanceOfUserTenantAccessPermission(userProjectPermissions) &&
|
||||
userProjectPermissions.permissions &&
|
||||
Array.isArray(userProjectPermissions.permissions)
|
||||
) {
|
||||
|
@ -2531,7 +2531,7 @@ export const PermissionsArray: Array<string> = [
|
||||
...new Set(Object.keys(Permission)),
|
||||
]; // Returns ["Owner", "Administrator"...]
|
||||
|
||||
export function instaceOfUserTenantAccessPermission(
|
||||
export function instanceOfUserTenantAccessPermission(
|
||||
object: any
|
||||
): object is UserTenantAccessPermission {
|
||||
return object._type === 'UserTenantAccessPermission';
|
||||
|
Loading…
Reference in New Issue
Block a user