feat(server): support editor -> viewer seat downgrades (#4181)
* new seat based project role checks implemented * everything done * minor bugfix
This commit is contained in:
committed by
GitHub
parent
50fd05afe8
commit
d903e8ffc4
@@ -2,6 +2,9 @@ import { UserRoleData } from '@/modules/shared/domain/rolesAndScopes/types'
|
||||
import { AvailableRoles } from '@speckle/shared'
|
||||
import { isUndefined } from 'lodash'
|
||||
|
||||
/**
|
||||
* Order roles by weight in descending order (meaning - highest permission roles come first)
|
||||
*/
|
||||
export const orderByWeight = <T extends AvailableRoles>(
|
||||
roles: T[],
|
||||
definitions: UserRoleData<T>[]
|
||||
|
||||
Reference in New Issue
Block a user