feat: Introduce advanced permissions (#7844)
This PR introduces the possibility of inviting new users with an `admin` role and changing the role of already invited users. Also using scoped permission checks where applicable instead of using user role checks. --------- Co-authored-by: Val <68596159+valya@users.noreply.github.com> Co-authored-by: Alex Grozav <alex@grozav.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
@@ -71,6 +71,7 @@ import {
|
||||
isValidTheme,
|
||||
updateTheme,
|
||||
} from './ui.utils';
|
||||
import { useUsersStore } from './users.store';
|
||||
|
||||
let savedTheme: ThemeOption = 'system';
|
||||
try {
|
||||
@@ -373,6 +374,7 @@ export const useUIStore = defineStore(STORES.UI, {
|
||||
let linkUrl = '';
|
||||
|
||||
const searchParams = new URLSearchParams();
|
||||
const { isInstanceOwner } = useUsersStore();
|
||||
|
||||
if (deploymentType === 'cloud' && hasPermission(['instanceOwner'])) {
|
||||
const adminPanelHost = new URL(window.location.href).host.split('.').slice(1).join('.');
|
||||
|
||||
Reference in New Issue
Block a user