0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 07:43:20 +00:00

Remove Google permissions check function

This commit is contained in:
G.Ambatte
2025-11-10 06:07:37 +00:00
parent de85c84685
commit 14ea286aa2

View File

@@ -264,26 +264,6 @@ const GoogleActions = {
return obj.data.id;
},
checkPermissions : async (auth, brew)=>{
if(!brew?.googleId) return;
const drive = googleDrive.drive({ version: 'v3', auth });
try {
const driveData = await drive.permissions.list({ fileId: brew.googleId });
const permissionsList = driveData?.data?.permissions;
if(permissionsList.some((permission)=>{
return permission.id == 'anyoneWithLink' && permission.role == 'writer';
})){
return 1;
};
} catch (err) {
return err.code;
}
return 999;
},
getGoogleBrew : async (auth = defaultAuth, id, accessId, accessType)=>{
const drive = googleDrive.drive({ version: 'v3', auth: auth });