🐛Sharing files doesn't work for the files and folders from "My Drive" (#143)

🐛small fix on the token expiration also
This commit is contained in:
Anton Shepilov
2023-07-05 18:08:33 +02:00
committed by GitHub
parent 8ed6ac4097
commit 20fb9f3ea3
8 changed files with 349 additions and 242 deletions
@@ -160,9 +160,10 @@ export const getAccessLevel = async (
if (id === "shared_with_me") return "read";
//If it is my personal folder, I have full access
if (context?.user?.id && id.startsWith("user_")) {
if (id.startsWith("user_")) {
if (id === "user_" + context.user?.id) return "manage";
if (await isCompanyApplication(context)) return "manage";
return "none";
}
let publicToken = context.public_token;