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:
@@ -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 });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user