Fix: disable project role select for non admin (#3093)
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
:disabled-item-tooltip="disabledItemsTooltip"
|
||||
:disabled-item-predicate="disabledItemPredicate"
|
||||
:allow-unset="allowUnset"
|
||||
:disabled="disabled"
|
||||
>
|
||||
<template #nothing-selected>
|
||||
{{ multiple ? 'Select roles' : 'Select role' }}
|
||||
@@ -64,6 +65,7 @@ const props = defineProps<{
|
||||
disabledItems?: StreamRoles[]
|
||||
disabledItemsTooltip?: string
|
||||
allowUnset?: boolean
|
||||
disabled?: boolean
|
||||
}>()
|
||||
|
||||
const elementToWatchForChanges = ref(null as Nullable<HTMLElement>)
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
label="Project role"
|
||||
size="md"
|
||||
:disabled-items="[Roles.Stream.Owner]"
|
||||
:disabled="!isAdmin"
|
||||
@update:model-value="save()"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -2491,6 +2491,7 @@ export type Query = {
|
||||
/** Validates the slug, to make sure it contains only valid characters and its not taken. */
|
||||
validateWorkspaceSlug: Scalars['Boolean']['output'];
|
||||
workspace: Workspace;
|
||||
workspaceBySlug: Workspace;
|
||||
/**
|
||||
* Look for an invitation to a workspace, for the current user (authed or not).
|
||||
*
|
||||
@@ -2635,6 +2636,11 @@ export type QueryWorkspaceArgs = {
|
||||
};
|
||||
|
||||
|
||||
export type QueryWorkspaceBySlugArgs = {
|
||||
slug: Scalars['String']['input'];
|
||||
};
|
||||
|
||||
|
||||
export type QueryWorkspaceInviteArgs = {
|
||||
token?: InputMaybe<Scalars['String']['input']>;
|
||||
workspaceId?: InputMaybe<Scalars['String']['input']>;
|
||||
@@ -6880,6 +6886,7 @@ export type QueryFieldArgs = {
|
||||
userSearch: QueryUserSearchArgs,
|
||||
validateWorkspaceSlug: QueryValidateWorkspaceSlugArgs,
|
||||
workspace: QueryWorkspaceArgs,
|
||||
workspaceBySlug: QueryWorkspaceBySlugArgs,
|
||||
workspaceInvite: QueryWorkspaceInviteArgs,
|
||||
}
|
||||
export type ResourceIdentifierFieldArgs = {
|
||||
|
||||
Reference in New Issue
Block a user