mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-14 00:19:16 +01:00
fix: cleanup old user permissions
This commit is contained in:
parent
69383e17aa
commit
50b0c86312
@ -65,9 +65,6 @@ class UserController extends Controller {
|
||||
);
|
||||
const splash = await this.userSplashService.getAllUserSplashs(user);
|
||||
|
||||
// TODO: remove this line after we remove it from db.
|
||||
delete user.permissions;
|
||||
|
||||
return res
|
||||
.status(200)
|
||||
.json({ user, permissions, feedback, splash })
|
||||
|
@ -109,9 +109,9 @@ export class AccessService {
|
||||
}
|
||||
}
|
||||
|
||||
async getPermissionsForUser(user: User): Promise<IUserPermission[]> {
|
||||
async getPermissionsForUser(user: IUser): Promise<IUserPermission[]> {
|
||||
if (user.isAPI) {
|
||||
return user.permissions.map((p) => ({
|
||||
return user.permissions?.map((p) => ({
|
||||
permission: p,
|
||||
}));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user