🌟 Data migration from nextcloud (#302)
- Files upload to Twake Drive - New logger
This commit is contained in:
@@ -21,6 +21,7 @@ import {
|
||||
ConfigureRequest,
|
||||
} from "../types";
|
||||
import { ConsoleHookUser } from "src/services/console/types";
|
||||
import User from "src/services/user/entities/user";
|
||||
|
||||
export class ApplicationsApiController {
|
||||
async token(
|
||||
@@ -174,9 +175,9 @@ export class ApplicationsApiController {
|
||||
last_name: string;
|
||||
};
|
||||
}>,
|
||||
): Promise<any> {
|
||||
): Promise<User> {
|
||||
try {
|
||||
await gr.services.console.getClient().updateLocalUserFromConsole({
|
||||
return await gr.services.console.getClient().updateLocalUserFromConsole({
|
||||
email: request.body.email.trim().toLocaleLowerCase(),
|
||||
name: request.body.first_name,
|
||||
surname: request.body.last_name,
|
||||
@@ -185,7 +186,6 @@ export class ApplicationsApiController {
|
||||
logger.error(err);
|
||||
throw err;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ export const getAccessLevel = async (
|
||||
}
|
||||
|
||||
if (id.startsWith("user_")) {
|
||||
if (await isCompanyApplication(context)) return "read";
|
||||
if (await isCompanyApplication(context)) return "manage";
|
||||
}
|
||||
|
||||
if (context?.user?.id) {
|
||||
@@ -432,7 +432,9 @@ export const getItemScope = async (
|
||||
{},
|
||||
context,
|
||||
);
|
||||
scope = driveItemParent.scope;
|
||||
//when application is creating document, there is not user in the context, so there is not scope as well
|
||||
//TODO [ASH] do not forget tofix it when the context will be emulated during the application rework
|
||||
scope = driveItemParent?.scope || item.scope;
|
||||
}
|
||||
return scope;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user