Add fields for admin panel access and workspace version (#10451)

Prepare for better version upgrade system + split admin panel into two
permissions + fix GraphQL generation detection

---------

Co-authored-by: ehconitin <nitinkoche03@gmail.com>
This commit is contained in:
Félix Malfait
2025-02-24 21:38:41 +01:00
committed by GitHub
parent d3fe322fc7
commit dde70ee3b0
17 changed files with 91 additions and 17 deletions

View File

@ -207,6 +207,7 @@ export class SignInUpService {
const userToCreate = this.userRepository.create({
...newUser,
defaultAvatarUrl: imagePath,
canAccessFullAdminPanel: false,
canImpersonate: false,
} as Partial<User>);
@ -289,6 +290,7 @@ export class SignInUpService {
const user: PartialUserWithPicture = {
...partialUserWithPicture,
canImpersonate: false,
canAccessFullAdminPanel: false,
};
if (!user.email) {
@ -303,6 +305,7 @@ export class SignInUpService {
// if the workspace doesn't exist it means it's the first user of the workspace
user.canImpersonate = true;
user.canAccessFullAdminPanel = true;
// let the creation of the first workspace
if (workspacesCount > 0) {